
// Generated from Pin.g4 by ANTLR 4.13.1


#include "PinListener.h"
#include "PinVisitor.h"

#include "PinParser.h"


using namespace antlrcpp;

using namespace antlr4;

namespace {

struct PinParserStaticData final {
  PinParserStaticData(std::vector<std::string> ruleNames,
                        std::vector<std::string> literalNames,
                        std::vector<std::string> symbolicNames)
      : ruleNames(std::move(ruleNames)), literalNames(std::move(literalNames)),
        symbolicNames(std::move(symbolicNames)),
        vocabulary(this->literalNames, this->symbolicNames) {}

  PinParserStaticData(const PinParserStaticData&) = delete;
  PinParserStaticData(PinParserStaticData&&) = delete;
  PinParserStaticData& operator=(const PinParserStaticData&) = delete;
  PinParserStaticData& operator=(PinParserStaticData&&) = delete;

  std::vector<antlr4::dfa::DFA> decisionToDFA;
  antlr4::atn::PredictionContextCache sharedContextCache;
  const std::vector<std::string> ruleNames;
  const std::vector<std::string> literalNames;
  const std::vector<std::string> symbolicNames;
  const antlr4::dfa::Vocabulary vocabulary;
  antlr4::atn::SerializedATNView serializedATN;
  std::unique_ptr<antlr4::atn::ATN> atn;
};

::antlr4::internal::OnceFlag pinParserOnceFlag;
#if ANTLR4_USE_THREAD_LOCAL_CACHE
static thread_local
#endif
PinParserStaticData *pinParserStaticData = nullptr;

void pinParserInitialize() {
#if ANTLR4_USE_THREAD_LOCAL_CACHE
  if (pinParserStaticData != nullptr) {
    return;
  }
#else
  assert(pinParserStaticData == nullptr);
#endif
  auto staticData = std::make_unique<PinParserStaticData>(
    std::vector<std::string>{
      "program", "defglobal", "globalstate", "block", "statement", "signalState", 
      "pass", "defvar", "declareStruct", "defstvar", "onest", "assign", 
      "assginNoEnd", "assignOne", "rightvar", "stRightVar", "assignStOne", 
      "stFromExpr", "assignOp", "printFormatPart", "singleExpr", "multiExpr", 
      "fmtString", "hs_print", "pinAutoAddSub", "expr", "list", "element", 
      "map", "mapelement", "mapkey", "atom", "revVar", "pinvar", "listMapVar", 
      "listindex", "structMem", "structMemVar", "stMemVar", "memberFunAccess", 
      "funobj", "function", "defFunRet", "funretArg", "retCode", "defArgumentList", 
      "defArgument", "format_string", "callFun", "realCallFun", "multiCallFun", 
      "fun_ret", "ret_id", "argumentList", "argument", "if", "zif", "qt", 
      "for", "forinvar", "forinit", "forinc", "break", "continue", "struct_body", 
      "struct_var", "pinFlag", "unknown"
    },
    std::vector<std::string>{
      "", "'{'", "'}'", "';'", "'pass;'", "','", "'='", "'/='", "'*/'", 
      "'+='", "'-='", "'%'", "'('", "')'", "'<<'", "'-'", "'*'", "'/'", 
      "'+'", "'<'", "'<='", "'>'", "'>='", "'=='", "'!='", "'['", "']'", 
      "'.'", "'_'", "'while'", "'wj.walk'", "'tuichu'", "'break'", "'jixu'", 
      "'continue'", "", "", "", "", "'kong'", "", "", "", "'in'", "'~'", 
      "'&'", "'|'", "'^'", "", "", "", "'hs'", "':'", "", "", "", "", "", 
      "", "", "", "'u16'"
    },
    std::vector<std::string>{
      "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 
      "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 
      "", "GLOBAL", "JIEGOU_SPACE", "JIEGOU_KEY", "AUTO_ADD_SUB", "EMPTY_VALUE", 
      "AND", "OR", "NOT", "IN", "LOG_REV", "LOG_AND", "LOG_OR", "LOG_XOR", 
      "DA_YIN_KEY", "HANSHU", "FANHUI_KEY", "HUIDIAO", "FUN_RET_AUTO_DEF", 
      "IF_KEY", "ZIF_KEY", "QT_KEY", "FOR_KEY", "TYPE_ID", "BOOL_VALUE", 
      "PACK_NAME", "PIN_STATIC_FLAG", "U16STRING_FLAG", "VARNAME", "INT_VALUE", 
      "FLOAT_VALUE", "CHAR_VALUE", "STRING_VALUE", "RAW_STRING_VALUE", "WS", 
      "LINE_COMMENT", "COMMENT", "CHINESE_SYMBOL", "STKEY", "DIGIT"
    }
  );
  static const int32_t serializedATNSegment[] = {
  	4,1,73,772,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,
  	7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,
  	14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,
  	21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7,
  	28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,2,35,7,
  	35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2,42,7,
  	42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,7,
  	49,2,50,7,50,2,51,7,51,2,52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,7,
  	56,2,57,7,57,2,58,7,58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,7,
  	63,2,64,7,64,2,65,7,65,2,66,7,66,2,67,7,67,1,0,1,0,1,0,1,0,1,0,5,0,142,
  	8,0,10,0,12,0,145,9,0,1,1,1,1,1,1,5,1,150,8,1,10,1,12,1,153,9,1,1,1,1,
  	1,3,1,157,8,1,1,2,1,2,1,2,1,2,3,2,163,8,2,1,3,1,3,5,3,167,8,3,10,3,12,
  	3,170,9,3,1,3,1,3,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
  	3,4,187,8,4,1,5,1,5,1,5,1,6,1,6,1,7,1,7,1,7,1,7,1,7,5,7,199,8,7,10,7,
  	12,7,202,9,7,1,7,3,7,205,8,7,1,8,1,8,1,8,1,8,3,8,211,8,8,1,9,1,9,1,9,
  	1,9,3,9,217,8,9,1,9,5,9,220,8,9,10,9,12,9,223,9,9,1,9,1,9,1,10,1,10,3,
  	10,229,8,10,1,11,1,11,1,11,1,12,1,12,1,12,5,12,237,8,12,10,12,12,12,240,
  	9,12,1,13,1,13,1,13,1,13,1,13,3,13,247,8,13,1,14,1,14,1,14,1,14,1,14,
  	3,14,254,8,14,1,15,1,15,1,15,1,15,1,15,5,15,261,8,15,10,15,12,15,264,
  	9,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,16,5,16,274,8,16,10,16,12,16,
  	277,9,16,1,16,1,16,1,16,3,16,282,8,16,1,17,1,17,1,18,1,18,1,19,1,19,1,
  	19,3,19,291,8,19,1,20,1,20,1,21,1,21,1,21,1,21,5,21,299,8,21,10,21,12,
  	21,302,9,21,1,21,1,21,1,22,1,22,1,22,1,23,1,23,1,23,1,23,1,23,1,23,1,
  	23,1,23,1,23,1,23,1,23,5,23,320,8,23,10,23,12,23,323,9,23,1,23,1,23,1,
  	23,1,23,1,23,1,23,1,23,1,23,5,23,333,8,23,10,23,12,23,336,9,23,1,23,1,
  	23,3,23,340,8,23,1,24,1,24,1,24,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,
  	25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,
  	25,3,25,367,8,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,
  	25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,
  	25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,
  	25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,
  	25,1,25,1,25,5,25,424,8,25,10,25,12,25,427,9,25,1,26,1,26,1,26,1,26,5,
  	26,433,8,26,10,26,12,26,436,9,26,3,26,438,8,26,1,26,1,26,1,27,1,27,1,
  	27,3,27,445,8,27,1,28,1,28,1,28,1,28,5,28,451,8,28,10,28,12,28,454,9,
  	28,3,28,456,8,28,1,28,1,28,1,29,1,29,1,29,1,29,1,30,1,30,1,31,1,31,1,
  	31,3,31,469,8,31,1,32,1,32,1,33,1,33,1,33,1,33,1,33,5,33,478,8,33,10,
  	33,12,33,481,9,33,1,33,1,33,3,33,485,8,33,1,34,1,34,1,34,1,34,1,34,5,
  	34,492,8,34,10,34,12,34,495,9,34,1,34,1,34,3,34,499,8,34,1,35,1,35,1,
  	36,1,36,1,36,1,36,1,37,1,37,1,37,1,37,1,38,1,38,1,39,1,39,1,39,1,39,1,
  	40,1,40,1,40,3,40,520,8,40,1,41,1,41,1,41,1,41,3,41,526,8,41,1,41,1,41,
  	3,41,530,8,41,1,41,1,41,1,42,1,42,1,42,1,42,5,42,538,8,42,10,42,12,42,
  	541,9,42,1,42,1,42,1,42,1,42,3,42,547,8,42,1,43,1,43,1,44,1,44,1,44,1,
  	44,5,44,555,8,44,10,44,12,44,558,9,44,1,44,1,44,1,44,1,44,3,44,564,8,
  	44,1,45,1,45,1,45,5,45,569,8,45,10,45,12,45,572,9,45,1,46,1,46,1,46,1,
  	46,1,46,1,46,3,46,580,8,46,1,47,1,47,1,48,1,48,1,48,1,48,1,48,1,48,1,
  	48,1,48,1,48,1,48,1,48,3,48,595,8,48,1,49,1,49,1,49,3,49,600,8,49,1,49,
  	1,49,5,49,604,8,49,10,49,12,49,607,9,49,1,49,1,49,1,49,3,49,612,8,49,
  	1,49,1,49,5,49,616,8,49,10,49,12,49,619,9,49,3,49,621,8,49,1,50,1,50,
  	1,50,1,50,3,50,627,8,50,1,50,1,50,1,51,1,51,1,51,5,51,634,8,51,10,51,
  	12,51,637,9,51,1,51,3,51,640,8,51,1,51,1,51,1,52,1,52,3,52,646,8,52,1,
  	53,1,53,1,53,5,53,651,8,53,10,53,12,53,654,9,53,1,54,1,54,1,55,1,55,1,
  	55,1,55,5,55,662,8,55,10,55,12,55,665,9,55,1,55,3,55,668,8,55,1,56,1,
  	56,1,56,1,56,1,57,1,57,1,57,1,58,1,58,1,58,1,58,1,58,1,58,3,58,683,8,
  	58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,
  	58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,5,
  	58,712,8,58,10,58,12,58,715,9,58,1,58,1,58,1,58,3,58,720,8,58,1,59,1,
  	59,1,60,1,60,1,60,3,60,727,8,60,1,61,1,61,1,61,3,61,732,8,61,1,61,1,61,
  	1,61,5,61,737,8,61,10,61,12,61,740,9,61,1,62,1,62,1,62,3,62,745,8,62,
  	1,63,1,63,1,63,3,63,750,8,63,1,64,1,64,5,64,754,8,64,10,64,12,64,757,
  	9,64,1,64,1,64,1,65,1,65,1,65,1,65,1,66,1,66,1,67,4,67,768,8,67,11,67,
  	12,67,769,1,67,1,769,2,50,122,68,0,2,4,6,8,10,12,14,16,18,20,22,24,26,
  	28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,
  	74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,
  	116,118,120,122,124,126,128,130,132,134,0,3,1,0,6,10,2,0,57,57,62,62,
  	2,0,28,28,62,62,829,0,143,1,0,0,0,2,146,1,0,0,0,4,162,1,0,0,0,6,164,1,
  	0,0,0,8,186,1,0,0,0,10,188,1,0,0,0,12,191,1,0,0,0,14,193,1,0,0,0,16,206,
  	1,0,0,0,18,212,1,0,0,0,20,228,1,0,0,0,22,230,1,0,0,0,24,233,1,0,0,0,26,
  	246,1,0,0,0,28,253,1,0,0,0,30,255,1,0,0,0,32,267,1,0,0,0,34,283,1,0,0,
  	0,36,285,1,0,0,0,38,287,1,0,0,0,40,292,1,0,0,0,42,294,1,0,0,0,44,305,
  	1,0,0,0,46,339,1,0,0,0,48,341,1,0,0,0,50,366,1,0,0,0,52,428,1,0,0,0,54,
  	444,1,0,0,0,56,446,1,0,0,0,58,459,1,0,0,0,60,463,1,0,0,0,62,468,1,0,0,
  	0,64,470,1,0,0,0,66,472,1,0,0,0,68,486,1,0,0,0,70,500,1,0,0,0,72,502,
  	1,0,0,0,74,506,1,0,0,0,76,510,1,0,0,0,78,512,1,0,0,0,80,519,1,0,0,0,82,
  	521,1,0,0,0,84,546,1,0,0,0,86,548,1,0,0,0,88,563,1,0,0,0,90,565,1,0,0,
  	0,92,579,1,0,0,0,94,581,1,0,0,0,96,594,1,0,0,0,98,620,1,0,0,0,100,622,
  	1,0,0,0,102,630,1,0,0,0,104,645,1,0,0,0,106,647,1,0,0,0,108,655,1,0,0,
  	0,110,657,1,0,0,0,112,669,1,0,0,0,114,673,1,0,0,0,116,719,1,0,0,0,118,
  	721,1,0,0,0,120,726,1,0,0,0,122,731,1,0,0,0,124,744,1,0,0,0,126,749,1,
  	0,0,0,128,751,1,0,0,0,130,760,1,0,0,0,132,764,1,0,0,0,134,767,1,0,0,0,
  	136,142,3,82,41,0,137,142,3,2,1,0,138,142,3,8,4,0,139,142,3,16,8,0,140,
  	142,5,71,0,0,141,136,1,0,0,0,141,137,1,0,0,0,141,138,1,0,0,0,141,139,
  	1,0,0,0,141,140,1,0,0,0,142,145,1,0,0,0,143,141,1,0,0,0,143,144,1,0,0,
  	0,144,1,1,0,0,0,145,143,1,0,0,0,146,147,5,35,0,0,147,151,5,1,0,0,148,
  	150,3,4,2,0,149,148,1,0,0,0,150,153,1,0,0,0,151,149,1,0,0,0,151,152,1,
  	0,0,0,152,154,1,0,0,0,153,151,1,0,0,0,154,156,5,2,0,0,155,157,5,3,0,0,
  	156,155,1,0,0,0,156,157,1,0,0,0,157,3,1,0,0,0,158,163,3,14,7,0,159,163,
  	3,18,9,0,160,163,3,22,11,0,161,163,3,16,8,0,162,158,1,0,0,0,162,159,1,
  	0,0,0,162,160,1,0,0,0,162,161,1,0,0,0,163,5,1,0,0,0,164,168,5,1,0,0,165,
  	167,3,8,4,0,166,165,1,0,0,0,167,170,1,0,0,0,168,166,1,0,0,0,168,169,1,
  	0,0,0,169,171,1,0,0,0,170,168,1,0,0,0,171,172,5,2,0,0,172,7,1,0,0,0,173,
  	187,3,14,7,0,174,187,3,18,9,0,175,187,3,22,11,0,176,187,3,46,23,0,177,
  	187,3,96,48,0,178,187,3,6,3,0,179,187,3,88,44,0,180,187,3,110,55,0,181,
  	187,3,116,58,0,182,187,3,124,62,0,183,187,3,126,63,0,184,187,3,10,5,0,
  	185,187,3,12,6,0,186,173,1,0,0,0,186,174,1,0,0,0,186,175,1,0,0,0,186,
  	176,1,0,0,0,186,177,1,0,0,0,186,178,1,0,0,0,186,179,1,0,0,0,186,180,1,
  	0,0,0,186,181,1,0,0,0,186,182,1,0,0,0,186,183,1,0,0,0,186,184,1,0,0,0,
  	186,185,1,0,0,0,187,9,1,0,0,0,188,189,3,50,25,0,189,190,5,3,0,0,190,11,
  	1,0,0,0,191,192,5,4,0,0,192,13,1,0,0,0,193,204,5,57,0,0,194,205,3,22,
  	11,0,195,200,5,62,0,0,196,197,5,5,0,0,197,199,5,62,0,0,198,196,1,0,0,
  	0,199,202,1,0,0,0,200,198,1,0,0,0,200,201,1,0,0,0,201,203,1,0,0,0,202,
  	200,1,0,0,0,203,205,5,3,0,0,204,194,1,0,0,0,204,195,1,0,0,0,205,15,1,
  	0,0,0,206,207,5,36,0,0,207,208,5,62,0,0,208,210,3,128,64,0,209,211,5,
  	3,0,0,210,209,1,0,0,0,210,211,1,0,0,0,211,17,1,0,0,0,212,213,5,62,0,0,
  	213,221,3,20,10,0,214,216,5,5,0,0,215,217,5,62,0,0,216,215,1,0,0,0,216,
  	217,1,0,0,0,217,218,1,0,0,0,218,220,3,20,10,0,219,214,1,0,0,0,220,223,
  	1,0,0,0,221,219,1,0,0,0,221,222,1,0,0,0,222,224,1,0,0,0,223,221,1,0,0,
  	0,224,225,5,3,0,0,225,19,1,0,0,0,226,229,3,32,16,0,227,229,5,62,0,0,228,
  	226,1,0,0,0,228,227,1,0,0,0,229,21,1,0,0,0,230,231,3,24,12,0,231,232,
  	5,3,0,0,232,23,1,0,0,0,233,238,3,26,13,0,234,235,5,5,0,0,235,237,3,26,
  	13,0,236,234,1,0,0,0,237,240,1,0,0,0,238,236,1,0,0,0,238,239,1,0,0,0,
  	239,25,1,0,0,0,240,238,1,0,0,0,241,242,3,66,33,0,242,243,3,36,18,0,243,
  	244,3,28,14,0,244,247,1,0,0,0,245,247,3,32,16,0,246,241,1,0,0,0,246,245,
  	1,0,0,0,247,27,1,0,0,0,248,254,3,50,25,0,249,254,3,52,26,0,250,254,3,
  	56,28,0,251,254,3,30,15,0,252,254,5,39,0,0,253,248,1,0,0,0,253,249,1,
  	0,0,0,253,250,1,0,0,0,253,251,1,0,0,0,253,252,1,0,0,0,254,29,1,0,0,0,
  	255,256,5,62,0,0,256,257,5,1,0,0,257,262,3,50,25,0,258,259,5,5,0,0,259,
  	261,3,50,25,0,260,258,1,0,0,0,261,264,1,0,0,0,262,260,1,0,0,0,262,263,
  	1,0,0,0,263,265,1,0,0,0,264,262,1,0,0,0,265,266,5,2,0,0,266,31,1,0,0,
  	0,267,268,5,62,0,0,268,281,5,6,0,0,269,270,5,1,0,0,270,275,3,50,25,0,
  	271,272,5,5,0,0,272,274,3,50,25,0,273,271,1,0,0,0,274,277,1,0,0,0,275,
  	273,1,0,0,0,275,276,1,0,0,0,276,278,1,0,0,0,277,275,1,0,0,0,278,279,5,
  	2,0,0,279,282,1,0,0,0,280,282,3,34,17,0,281,269,1,0,0,0,281,280,1,0,0,
  	0,282,33,1,0,0,0,283,284,3,50,25,0,284,35,1,0,0,0,285,286,7,0,0,0,286,
  	37,1,0,0,0,287,290,5,11,0,0,288,291,3,40,20,0,289,291,3,42,21,0,290,288,
  	1,0,0,0,290,289,1,0,0,0,291,39,1,0,0,0,292,293,3,50,25,0,293,41,1,0,0,
  	0,294,295,5,12,0,0,295,300,3,50,25,0,296,297,5,5,0,0,297,299,3,50,25,
  	0,298,296,1,0,0,0,299,302,1,0,0,0,300,298,1,0,0,0,300,301,1,0,0,0,301,
  	303,1,0,0,0,302,300,1,0,0,0,303,304,5,13,0,0,304,43,1,0,0,0,305,306,3,
  	94,47,0,306,307,3,38,19,0,307,45,1,0,0,0,308,309,5,48,0,0,309,310,5,12,
  	0,0,310,311,3,44,22,0,311,312,5,13,0,0,312,313,5,3,0,0,313,340,1,0,0,
  	0,314,315,5,48,0,0,315,316,5,12,0,0,316,321,3,50,25,0,317,318,5,5,0,0,
  	318,320,3,50,25,0,319,317,1,0,0,0,320,323,1,0,0,0,321,319,1,0,0,0,321,
  	322,1,0,0,0,322,324,1,0,0,0,323,321,1,0,0,0,324,325,5,13,0,0,325,326,
  	5,3,0,0,326,340,1,0,0,0,327,328,5,48,0,0,328,329,5,14,0,0,329,334,3,50,
  	25,0,330,331,5,14,0,0,331,333,3,50,25,0,332,330,1,0,0,0,333,336,1,0,0,
  	0,334,332,1,0,0,0,334,335,1,0,0,0,335,337,1,0,0,0,336,334,1,0,0,0,337,
  	338,5,3,0,0,338,340,1,0,0,0,339,308,1,0,0,0,339,314,1,0,0,0,339,327,1,
  	0,0,0,340,47,1,0,0,0,341,342,3,66,33,0,342,343,5,38,0,0,343,49,1,0,0,
  	0,344,345,6,25,-1,0,345,346,5,12,0,0,346,347,3,50,25,0,347,348,5,13,0,
  	0,348,367,1,0,0,0,349,367,3,132,66,0,350,367,3,48,24,0,351,352,5,15,0,
  	0,352,367,3,62,31,0,353,354,5,44,0,0,354,367,3,64,32,0,355,367,3,44,22,
  	0,356,357,5,42,0,0,357,367,3,50,25,11,358,367,5,63,0,0,359,367,5,64,0,
  	0,360,367,5,66,0,0,361,367,5,67,0,0,362,367,5,58,0,0,363,367,5,65,0,0,
  	364,367,3,66,33,0,365,367,3,98,49,0,366,344,1,0,0,0,366,349,1,0,0,0,366,
  	350,1,0,0,0,366,351,1,0,0,0,366,353,1,0,0,0,366,355,1,0,0,0,366,356,1,
  	0,0,0,366,358,1,0,0,0,366,359,1,0,0,0,366,360,1,0,0,0,366,361,1,0,0,0,
  	366,362,1,0,0,0,366,363,1,0,0,0,366,364,1,0,0,0,366,365,1,0,0,0,367,425,
  	1,0,0,0,368,369,10,28,0,0,369,370,5,16,0,0,370,424,3,50,25,29,371,372,
  	10,27,0,0,372,373,5,17,0,0,373,424,3,50,25,28,374,375,10,25,0,0,375,376,
  	5,11,0,0,376,424,3,50,25,26,377,378,10,24,0,0,378,379,5,18,0,0,379,424,
  	3,50,25,25,380,381,10,23,0,0,381,382,5,15,0,0,382,424,3,50,25,24,383,
  	384,10,22,0,0,384,385,5,19,0,0,385,424,3,50,25,23,386,387,10,21,0,0,387,
  	388,5,20,0,0,388,424,3,50,25,22,389,390,10,20,0,0,390,391,5,21,0,0,391,
  	424,3,50,25,21,392,393,10,19,0,0,393,394,5,22,0,0,394,424,3,50,25,20,
  	395,396,10,18,0,0,396,397,5,23,0,0,397,424,3,50,25,19,398,399,10,17,0,
  	0,399,400,5,24,0,0,400,424,3,50,25,18,401,402,10,16,0,0,402,403,5,45,
  	0,0,403,424,3,50,25,17,404,405,10,15,0,0,405,406,5,47,0,0,406,424,3,50,
  	25,16,407,408,10,14,0,0,408,409,5,46,0,0,409,424,3,50,25,15,410,411,10,
  	10,0,0,411,412,5,40,0,0,412,424,3,50,25,11,413,414,10,9,0,0,414,415,5,
  	41,0,0,415,424,3,50,25,10,416,417,10,13,0,0,417,418,5,42,0,0,418,419,
  	5,43,0,0,419,424,3,28,14,0,420,421,10,12,0,0,421,422,5,43,0,0,422,424,
  	3,28,14,0,423,368,1,0,0,0,423,371,1,0,0,0,423,374,1,0,0,0,423,377,1,0,
  	0,0,423,380,1,0,0,0,423,383,1,0,0,0,423,386,1,0,0,0,423,389,1,0,0,0,423,
  	392,1,0,0,0,423,395,1,0,0,0,423,398,1,0,0,0,423,401,1,0,0,0,423,404,1,
  	0,0,0,423,407,1,0,0,0,423,410,1,0,0,0,423,413,1,0,0,0,423,416,1,0,0,0,
  	423,420,1,0,0,0,424,427,1,0,0,0,425,423,1,0,0,0,425,426,1,0,0,0,426,51,
  	1,0,0,0,427,425,1,0,0,0,428,437,5,25,0,0,429,434,3,54,27,0,430,431,5,
  	5,0,0,431,433,3,54,27,0,432,430,1,0,0,0,433,436,1,0,0,0,434,432,1,0,0,
  	0,434,435,1,0,0,0,435,438,1,0,0,0,436,434,1,0,0,0,437,429,1,0,0,0,437,
  	438,1,0,0,0,438,439,1,0,0,0,439,440,5,26,0,0,440,53,1,0,0,0,441,445,3,
  	50,25,0,442,445,3,52,26,0,443,445,3,30,15,0,444,441,1,0,0,0,444,442,1,
  	0,0,0,444,443,1,0,0,0,445,55,1,0,0,0,446,455,5,1,0,0,447,452,3,58,29,
  	0,448,449,5,5,0,0,449,451,3,58,29,0,450,448,1,0,0,0,451,454,1,0,0,0,452,
  	450,1,0,0,0,452,453,1,0,0,0,453,456,1,0,0,0,454,452,1,0,0,0,455,447,1,
  	0,0,0,455,456,1,0,0,0,456,457,1,0,0,0,457,458,5,2,0,0,458,57,1,0,0,0,
  	459,460,3,60,30,0,460,461,5,52,0,0,461,462,3,28,14,0,462,59,1,0,0,0,463,
  	464,3,50,25,0,464,61,1,0,0,0,465,469,5,63,0,0,466,469,5,64,0,0,467,469,
  	3,66,33,0,468,465,1,0,0,0,468,466,1,0,0,0,468,467,1,0,0,0,469,63,1,0,
  	0,0,470,471,3,66,33,0,471,65,1,0,0,0,472,479,5,62,0,0,473,474,5,25,0,
  	0,474,475,3,70,35,0,475,476,5,26,0,0,476,478,1,0,0,0,477,473,1,0,0,0,
  	478,481,1,0,0,0,479,477,1,0,0,0,479,480,1,0,0,0,480,484,1,0,0,0,481,479,
  	1,0,0,0,482,483,5,27,0,0,483,485,3,76,38,0,484,482,1,0,0,0,484,485,1,
  	0,0,0,485,67,1,0,0,0,486,493,5,62,0,0,487,488,5,25,0,0,488,489,3,70,35,
  	0,489,490,5,26,0,0,490,492,1,0,0,0,491,487,1,0,0,0,492,495,1,0,0,0,493,
  	491,1,0,0,0,493,494,1,0,0,0,494,498,1,0,0,0,495,493,1,0,0,0,496,497,5,
  	27,0,0,497,499,3,76,38,0,498,496,1,0,0,0,498,499,1,0,0,0,499,69,1,0,0,
  	0,500,501,3,50,25,0,501,71,1,0,0,0,502,503,5,62,0,0,503,504,5,27,0,0,
  	504,505,3,76,38,0,505,73,1,0,0,0,506,507,5,62,0,0,507,508,5,27,0,0,508,
  	509,3,76,38,0,509,75,1,0,0,0,510,511,5,62,0,0,511,77,1,0,0,0,512,513,
  	3,80,40,0,513,514,5,27,0,0,514,515,5,62,0,0,515,79,1,0,0,0,516,520,5,
  	57,0,0,517,520,5,59,0,0,518,520,3,66,33,0,519,516,1,0,0,0,519,517,1,0,
  	0,0,519,518,1,0,0,0,520,81,1,0,0,0,521,522,5,49,0,0,522,523,5,62,0,0,
  	523,525,5,12,0,0,524,526,3,90,45,0,525,524,1,0,0,0,525,526,1,0,0,0,526,
  	527,1,0,0,0,527,529,5,13,0,0,528,530,3,84,42,0,529,528,1,0,0,0,529,530,
  	1,0,0,0,530,531,1,0,0,0,531,532,3,6,3,0,532,83,1,0,0,0,533,534,5,12,0,
  	0,534,539,3,86,43,0,535,536,5,5,0,0,536,538,3,86,43,0,537,535,1,0,0,0,
  	538,541,1,0,0,0,539,537,1,0,0,0,539,540,1,0,0,0,540,542,1,0,0,0,541,539,
  	1,0,0,0,542,543,5,13,0,0,543,547,1,0,0,0,544,545,5,12,0,0,545,547,5,13,
  	0,0,546,533,1,0,0,0,546,544,1,0,0,0,547,85,1,0,0,0,548,549,7,1,0,0,549,
  	87,1,0,0,0,550,551,5,50,0,0,551,556,3,28,14,0,552,553,5,5,0,0,553,555,
  	3,28,14,0,554,552,1,0,0,0,555,558,1,0,0,0,556,554,1,0,0,0,556,557,1,0,
  	0,0,557,559,1,0,0,0,558,556,1,0,0,0,559,560,5,3,0,0,560,564,1,0,0,0,561,
  	562,5,50,0,0,562,564,5,3,0,0,563,550,1,0,0,0,563,561,1,0,0,0,564,89,1,
  	0,0,0,565,570,3,92,46,0,566,567,5,5,0,0,567,569,3,92,46,0,568,566,1,0,
  	0,0,569,572,1,0,0,0,570,568,1,0,0,0,570,571,1,0,0,0,571,91,1,0,0,0,572,
  	570,1,0,0,0,573,574,5,57,0,0,574,580,5,62,0,0,575,576,5,51,0,0,576,580,
  	5,62,0,0,577,578,5,62,0,0,578,580,5,62,0,0,579,573,1,0,0,0,579,575,1,
  	0,0,0,579,577,1,0,0,0,580,93,1,0,0,0,581,582,5,66,0,0,582,95,1,0,0,0,
  	583,584,3,98,49,0,584,585,5,3,0,0,585,595,1,0,0,0,586,587,3,102,51,0,
  	587,588,3,98,49,0,588,589,5,3,0,0,589,595,1,0,0,0,590,591,5,50,0,0,591,
  	592,3,98,49,0,592,593,5,3,0,0,593,595,1,0,0,0,594,583,1,0,0,0,594,586,
  	1,0,0,0,594,590,1,0,0,0,595,97,1,0,0,0,596,597,3,78,39,0,597,599,5,12,
  	0,0,598,600,3,106,53,0,599,598,1,0,0,0,599,600,1,0,0,0,600,601,1,0,0,
  	0,601,605,5,13,0,0,602,604,3,100,50,0,603,602,1,0,0,0,604,607,1,0,0,0,
  	605,603,1,0,0,0,605,606,1,0,0,0,606,621,1,0,0,0,607,605,1,0,0,0,608,609,
  	5,62,0,0,609,611,5,12,0,0,610,612,3,106,53,0,611,610,1,0,0,0,611,612,
  	1,0,0,0,612,613,1,0,0,0,613,617,5,13,0,0,614,616,3,100,50,0,615,614,1,
  	0,0,0,616,619,1,0,0,0,617,615,1,0,0,0,617,618,1,0,0,0,618,621,1,0,0,0,
  	619,617,1,0,0,0,620,596,1,0,0,0,620,608,1,0,0,0,621,99,1,0,0,0,622,623,
  	5,27,0,0,623,624,5,62,0,0,624,626,5,12,0,0,625,627,3,106,53,0,626,625,
  	1,0,0,0,626,627,1,0,0,0,627,628,1,0,0,0,628,629,5,13,0,0,629,101,1,0,
  	0,0,630,635,3,104,52,0,631,632,5,5,0,0,632,634,3,104,52,0,633,631,1,0,
  	0,0,634,637,1,0,0,0,635,633,1,0,0,0,635,636,1,0,0,0,636,639,1,0,0,0,637,
  	635,1,0,0,0,638,640,5,52,0,0,639,638,1,0,0,0,639,640,1,0,0,0,640,641,
  	1,0,0,0,641,642,5,6,0,0,642,103,1,0,0,0,643,646,3,66,33,0,644,646,5,28,
  	0,0,645,643,1,0,0,0,645,644,1,0,0,0,646,105,1,0,0,0,647,652,3,108,54,
  	0,648,649,5,5,0,0,649,651,3,108,54,0,650,648,1,0,0,0,651,654,1,0,0,0,
  	652,650,1,0,0,0,652,653,1,0,0,0,653,107,1,0,0,0,654,652,1,0,0,0,655,656,
  	3,28,14,0,656,109,1,0,0,0,657,658,5,53,0,0,658,659,3,50,25,0,659,663,
  	3,8,4,0,660,662,3,112,56,0,661,660,1,0,0,0,662,665,1,0,0,0,663,661,1,
  	0,0,0,663,664,1,0,0,0,664,667,1,0,0,0,665,663,1,0,0,0,666,668,3,114,57,
  	0,667,666,1,0,0,0,667,668,1,0,0,0,668,111,1,0,0,0,669,670,5,54,0,0,670,
  	671,3,50,25,0,671,672,3,8,4,0,672,113,1,0,0,0,673,674,5,55,0,0,674,675,
  	3,8,4,0,675,115,1,0,0,0,676,677,5,56,0,0,677,678,5,12,0,0,678,679,3,120,
  	60,0,679,680,3,50,25,0,680,682,5,3,0,0,681,683,3,122,61,0,682,681,1,0,
  	0,0,682,683,1,0,0,0,683,684,1,0,0,0,684,685,5,13,0,0,685,686,3,8,4,0,
  	686,720,1,0,0,0,687,688,5,29,0,0,688,689,3,50,25,0,689,690,3,8,4,0,690,
  	720,1,0,0,0,691,692,5,56,0,0,692,693,3,118,59,0,693,694,5,5,0,0,694,695,
  	3,118,59,0,695,696,5,43,0,0,696,697,3,28,14,0,697,698,3,8,4,0,698,720,
  	1,0,0,0,699,700,5,56,0,0,700,701,5,62,0,0,701,702,5,5,0,0,702,703,5,62,
  	0,0,703,704,5,5,0,0,704,705,5,62,0,0,705,706,5,43,0,0,706,707,5,30,0,
  	0,707,708,5,12,0,0,708,713,3,50,25,0,709,710,5,5,0,0,710,712,3,50,25,
  	0,711,709,1,0,0,0,712,715,1,0,0,0,713,711,1,0,0,0,713,714,1,0,0,0,714,
  	716,1,0,0,0,715,713,1,0,0,0,716,717,5,13,0,0,717,718,3,6,3,0,718,720,
  	1,0,0,0,719,676,1,0,0,0,719,687,1,0,0,0,719,691,1,0,0,0,719,699,1,0,0,
  	0,720,117,1,0,0,0,721,722,7,2,0,0,722,119,1,0,0,0,723,727,3,14,7,0,724,
  	727,3,22,11,0,725,727,5,3,0,0,726,723,1,0,0,0,726,724,1,0,0,0,726,725,
  	1,0,0,0,727,121,1,0,0,0,728,729,6,61,-1,0,729,732,3,48,24,0,730,732,3,
  	24,12,0,731,728,1,0,0,0,731,730,1,0,0,0,732,738,1,0,0,0,733,734,10,1,
  	0,0,734,735,5,5,0,0,735,737,3,122,61,0,736,733,1,0,0,0,737,740,1,0,0,
  	0,738,736,1,0,0,0,738,739,1,0,0,0,739,123,1,0,0,0,740,738,1,0,0,0,741,
  	745,5,31,0,0,742,743,5,32,0,0,743,745,5,3,0,0,744,741,1,0,0,0,744,742,
  	1,0,0,0,745,125,1,0,0,0,746,750,5,33,0,0,747,748,5,34,0,0,748,750,5,3,
  	0,0,749,746,1,0,0,0,749,747,1,0,0,0,750,127,1,0,0,0,751,755,5,1,0,0,752,
  	754,3,130,65,0,753,752,1,0,0,0,754,757,1,0,0,0,755,753,1,0,0,0,755,756,
  	1,0,0,0,756,758,1,0,0,0,757,755,1,0,0,0,758,759,5,2,0,0,759,129,1,0,0,
  	0,760,761,5,57,0,0,761,762,5,62,0,0,762,763,5,3,0,0,763,131,1,0,0,0,764,
  	765,5,60,0,0,765,133,1,0,0,0,766,768,9,0,0,0,767,766,1,0,0,0,768,769,
  	1,0,0,0,769,770,1,0,0,0,769,767,1,0,0,0,770,135,1,0,0,0,69,141,143,151,
  	156,162,168,186,200,204,210,216,221,228,238,246,253,262,275,281,290,300,
  	321,334,339,366,423,425,434,437,444,452,455,468,479,484,493,498,519,525,
  	529,539,546,556,563,570,579,594,599,605,611,617,620,626,635,639,645,652,
  	663,667,682,713,719,726,731,738,744,749,755,769
  };
  staticData->serializedATN = antlr4::atn::SerializedATNView(serializedATNSegment, sizeof(serializedATNSegment) / sizeof(serializedATNSegment[0]));

  antlr4::atn::ATNDeserializer deserializer;
  staticData->atn = deserializer.deserialize(staticData->serializedATN);

  const size_t count = staticData->atn->getNumberOfDecisions();
  staticData->decisionToDFA.reserve(count);
  for (size_t i = 0; i < count; i++) { 
    staticData->decisionToDFA.emplace_back(staticData->atn->getDecisionState(i), i);
  }
  pinParserStaticData = staticData.release();
}

}

PinParser::PinParser(TokenStream *input) : PinParser(input, antlr4::atn::ParserATNSimulatorOptions()) {}

PinParser::PinParser(TokenStream *input, const antlr4::atn::ParserATNSimulatorOptions &options) : Parser(input) {
  PinParser::initialize();
  _interpreter = new atn::ParserATNSimulator(this, *pinParserStaticData->atn, pinParserStaticData->decisionToDFA, pinParserStaticData->sharedContextCache, options);
}

PinParser::~PinParser() {
  delete _interpreter;
}

const atn::ATN& PinParser::getATN() const {
  return *pinParserStaticData->atn;
}

std::string PinParser::getGrammarFileName() const {
  return "Pin.g4";
}

const std::vector<std::string>& PinParser::getRuleNames() const {
  return pinParserStaticData->ruleNames;
}

const dfa::Vocabulary& PinParser::getVocabulary() const {
  return pinParserStaticData->vocabulary;
}

antlr4::atn::SerializedATNView PinParser::getSerializedATN() const {
  return pinParserStaticData->serializedATN;
}


//----------------- ProgramContext ------------------------------------------------------------------

PinParser::ProgramContext::ProgramContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PinParser::FunctionContext *> PinParser::ProgramContext::function() {
  return getRuleContexts<PinParser::FunctionContext>();
}

PinParser::FunctionContext* PinParser::ProgramContext::function(size_t i) {
  return getRuleContext<PinParser::FunctionContext>(i);
}

std::vector<PinParser::DefglobalContext *> PinParser::ProgramContext::defglobal() {
  return getRuleContexts<PinParser::DefglobalContext>();
}

PinParser::DefglobalContext* PinParser::ProgramContext::defglobal(size_t i) {
  return getRuleContext<PinParser::DefglobalContext>(i);
}

std::vector<PinParser::StatementContext *> PinParser::ProgramContext::statement() {
  return getRuleContexts<PinParser::StatementContext>();
}

PinParser::StatementContext* PinParser::ProgramContext::statement(size_t i) {
  return getRuleContext<PinParser::StatementContext>(i);
}

std::vector<PinParser::DeclareStructContext *> PinParser::ProgramContext::declareStruct() {
  return getRuleContexts<PinParser::DeclareStructContext>();
}

PinParser::DeclareStructContext* PinParser::ProgramContext::declareStruct(size_t i) {
  return getRuleContext<PinParser::DeclareStructContext>(i);
}

std::vector<tree::TerminalNode *> PinParser::ProgramContext::CHINESE_SYMBOL() {
  return getTokens(PinParser::CHINESE_SYMBOL);
}

tree::TerminalNode* PinParser::ProgramContext::CHINESE_SYMBOL(size_t i) {
  return getToken(PinParser::CHINESE_SYMBOL, i);
}


size_t PinParser::ProgramContext::getRuleIndex() const {
  return PinParser::RuleProgram;
}

void PinParser::ProgramContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterProgram(this);
}

void PinParser::ProgramContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitProgram(this);
}


std::any PinParser::ProgramContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitProgram(this);
  else
    return visitor->visitChildren(this);
}

PinParser::ProgramContext* PinParser::program() {
  ProgramContext *_localctx = _tracker.createInstance<ProgramContext>(_ctx, getState());
  enterRule(_localctx, 0, PinParser::RuleProgram);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(143);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & -2366900952830537710) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 64)) & 143) != 0)) {
      setState(141);
      _errHandler->sync(this);
      switch (_input->LA(1)) {
        case PinParser::HANSHU: {
          setState(136);
          function();
          break;
        }

        case PinParser::GLOBAL: {
          setState(137);
          defglobal();
          break;
        }

        case PinParser::T__0:
        case PinParser::T__3:
        case PinParser::T__11:
        case PinParser::T__14:
        case PinParser::T__27:
        case PinParser::T__28:
        case PinParser::T__30:
        case PinParser::T__31:
        case PinParser::T__32:
        case PinParser::T__33:
        case PinParser::NOT:
        case PinParser::LOG_REV:
        case PinParser::DA_YIN_KEY:
        case PinParser::FANHUI_KEY:
        case PinParser::IF_KEY:
        case PinParser::FOR_KEY:
        case PinParser::TYPE_ID:
        case PinParser::BOOL_VALUE:
        case PinParser::PACK_NAME:
        case PinParser::PIN_STATIC_FLAG:
        case PinParser::VARNAME:
        case PinParser::INT_VALUE:
        case PinParser::FLOAT_VALUE:
        case PinParser::CHAR_VALUE:
        case PinParser::STRING_VALUE:
        case PinParser::RAW_STRING_VALUE: {
          setState(138);
          statement();
          break;
        }

        case PinParser::JIEGOU_SPACE: {
          setState(139);
          declareStruct();
          break;
        }

        case PinParser::CHINESE_SYMBOL: {
          setState(140);
          match(PinParser::CHINESE_SYMBOL);
          break;
        }

      default:
        throw NoViableAltException(this);
      }
      setState(145);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- DefglobalContext ------------------------------------------------------------------

PinParser::DefglobalContext::DefglobalContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PinParser::DefglobalContext::GLOBAL() {
  return getToken(PinParser::GLOBAL, 0);
}

std::vector<PinParser::GlobalstateContext *> PinParser::DefglobalContext::globalstate() {
  return getRuleContexts<PinParser::GlobalstateContext>();
}

PinParser::GlobalstateContext* PinParser::DefglobalContext::globalstate(size_t i) {
  return getRuleContext<PinParser::GlobalstateContext>(i);
}


size_t PinParser::DefglobalContext::getRuleIndex() const {
  return PinParser::RuleDefglobal;
}

void PinParser::DefglobalContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterDefglobal(this);
}

void PinParser::DefglobalContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitDefglobal(this);
}


std::any PinParser::DefglobalContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitDefglobal(this);
  else
    return visitor->visitChildren(this);
}

PinParser::DefglobalContext* PinParser::defglobal() {
  DefglobalContext *_localctx = _tracker.createInstance<DefglobalContext>(_ctx, getState());
  enterRule(_localctx, 2, PinParser::RuleDefglobal);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(146);
    match(PinParser::GLOBAL);
    setState(147);
    match(PinParser::T__0);
    setState(151);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & 4755801275222720512) != 0)) {
      setState(148);
      globalstate();
      setState(153);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(154);
    match(PinParser::T__1);
    setState(156);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PinParser::T__2) {
      setState(155);
      match(PinParser::T__2);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- GlobalstateContext ------------------------------------------------------------------

PinParser::GlobalstateContext::GlobalstateContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PinParser::DefvarContext* PinParser::GlobalstateContext::defvar() {
  return getRuleContext<PinParser::DefvarContext>(0);
}

PinParser::DefstvarContext* PinParser::GlobalstateContext::defstvar() {
  return getRuleContext<PinParser::DefstvarContext>(0);
}

PinParser::AssignContext* PinParser::GlobalstateContext::assign() {
  return getRuleContext<PinParser::AssignContext>(0);
}

PinParser::DeclareStructContext* PinParser::GlobalstateContext::declareStruct() {
  return getRuleContext<PinParser::DeclareStructContext>(0);
}


size_t PinParser::GlobalstateContext::getRuleIndex() const {
  return PinParser::RuleGlobalstate;
}

void PinParser::GlobalstateContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterGlobalstate(this);
}

void PinParser::GlobalstateContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitGlobalstate(this);
}


std::any PinParser::GlobalstateContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitGlobalstate(this);
  else
    return visitor->visitChildren(this);
}

PinParser::GlobalstateContext* PinParser::globalstate() {
  GlobalstateContext *_localctx = _tracker.createInstance<GlobalstateContext>(_ctx, getState());
  enterRule(_localctx, 4, PinParser::RuleGlobalstate);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(162);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 4, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(158);
      defvar();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(159);
      defstvar();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(160);
      assign();
      break;
    }

    case 4: {
      enterOuterAlt(_localctx, 4);
      setState(161);
      declareStruct();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- BlockContext ------------------------------------------------------------------

PinParser::BlockContext::BlockContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PinParser::StatementContext *> PinParser::BlockContext::statement() {
  return getRuleContexts<PinParser::StatementContext>();
}

PinParser::StatementContext* PinParser::BlockContext::statement(size_t i) {
  return getRuleContext<PinParser::StatementContext>(i);
}


size_t PinParser::BlockContext::getRuleIndex() const {
  return PinParser::RuleBlock;
}

void PinParser::BlockContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterBlock(this);
}

void PinParser::BlockContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitBlock(this);
}


std::any PinParser::BlockContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitBlock(this);
  else
    return visitor->visitChildren(this);
}

PinParser::BlockContext* PinParser::block() {
  BlockContext *_localctx = _tracker.createInstance<BlockContext>(_ctx, getState());
  enterRule(_localctx, 6, PinParser::RuleBlock);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(164);
    match(PinParser::T__0);
    setState(168);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & -2367464005863174126) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 64)) & 15) != 0)) {
      setState(165);
      statement();
      setState(170);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(171);
    match(PinParser::T__1);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- StatementContext ------------------------------------------------------------------

PinParser::StatementContext::StatementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PinParser::DefvarContext* PinParser::StatementContext::defvar() {
  return getRuleContext<PinParser::DefvarContext>(0);
}

PinParser::DefstvarContext* PinParser::StatementContext::defstvar() {
  return getRuleContext<PinParser::DefstvarContext>(0);
}

PinParser::AssignContext* PinParser::StatementContext::assign() {
  return getRuleContext<PinParser::AssignContext>(0);
}

PinParser::Hs_printContext* PinParser::StatementContext::hs_print() {
  return getRuleContext<PinParser::Hs_printContext>(0);
}

PinParser::CallFunContext* PinParser::StatementContext::callFun() {
  return getRuleContext<PinParser::CallFunContext>(0);
}

PinParser::BlockContext* PinParser::StatementContext::block() {
  return getRuleContext<PinParser::BlockContext>(0);
}

PinParser::RetCodeContext* PinParser::StatementContext::retCode() {
  return getRuleContext<PinParser::RetCodeContext>(0);
}

PinParser::IfContext* PinParser::StatementContext::if_() {
  return getRuleContext<PinParser::IfContext>(0);
}

PinParser::ForContext* PinParser::StatementContext::for_() {
  return getRuleContext<PinParser::ForContext>(0);
}

PinParser::BreakContext* PinParser::StatementContext::break_() {
  return getRuleContext<PinParser::BreakContext>(0);
}

PinParser::ContinueContext* PinParser::StatementContext::continue_() {
  return getRuleContext<PinParser::ContinueContext>(0);
}

PinParser::SignalStateContext* PinParser::StatementContext::signalState() {
  return getRuleContext<PinParser::SignalStateContext>(0);
}

PinParser::PassContext* PinParser::StatementContext::pass() {
  return getRuleContext<PinParser::PassContext>(0);
}


size_t PinParser::StatementContext::getRuleIndex() const {
  return PinParser::RuleStatement;
}

void PinParser::StatementContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStatement(this);
}

void PinParser::StatementContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStatement(this);
}


std::any PinParser::StatementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitStatement(this);
  else
    return visitor->visitChildren(this);
}

PinParser::StatementContext* PinParser::statement() {
  StatementContext *_localctx = _tracker.createInstance<StatementContext>(_ctx, getState());
  enterRule(_localctx, 8, PinParser::RuleStatement);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(186);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 6, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(173);
      defvar();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(174);
      defstvar();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(175);
      assign();
      break;
    }

    case 4: {
      enterOuterAlt(_localctx, 4);
      setState(176);
      hs_print();
      break;
    }

    case 5: {
      enterOuterAlt(_localctx, 5);
      setState(177);
      callFun();
      break;
    }

    case 6: {
      enterOuterAlt(_localctx, 6);
      setState(178);
      block();
      break;
    }

    case 7: {
      enterOuterAlt(_localctx, 7);
      setState(179);
      retCode();
      break;
    }

    case 8: {
      enterOuterAlt(_localctx, 8);
      setState(180);
      if_();
      break;
    }

    case 9: {
      enterOuterAlt(_localctx, 9);
      setState(181);
      for_();
      break;
    }

    case 10: {
      enterOuterAlt(_localctx, 10);
      setState(182);
      break_();
      break;
    }

    case 11: {
      enterOuterAlt(_localctx, 11);
      setState(183);
      continue_();
      break;
    }

    case 12: {
      enterOuterAlt(_localctx, 12);
      setState(184);
      signalState();
      break;
    }

    case 13: {
      enterOuterAlt(_localctx, 13);
      setState(185);
      pass();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- SignalStateContext ------------------------------------------------------------------

PinParser::SignalStateContext::SignalStateContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PinParser::ExprContext* PinParser::SignalStateContext::expr() {
  return getRuleContext<PinParser::ExprContext>(0);
}


size_t PinParser::SignalStateContext::getRuleIndex() const {
  return PinParser::RuleSignalState;
}

void PinParser::SignalStateContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSignalState(this);
}

void PinParser::SignalStateContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSignalState(this);
}


std::any PinParser::SignalStateContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitSignalState(this);
  else
    return visitor->visitChildren(this);
}

PinParser::SignalStateContext* PinParser::signalState() {
  SignalStateContext *_localctx = _tracker.createInstance<SignalStateContext>(_ctx, getState());
  enterRule(_localctx, 10, PinParser::RuleSignalState);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(188);
    expr(0);
    setState(189);
    match(PinParser::T__2);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- PassContext ------------------------------------------------------------------

PinParser::PassContext::PassContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}


size_t PinParser::PassContext::getRuleIndex() const {
  return PinParser::RulePass;
}

void PinParser::PassContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterPass(this);
}

void PinParser::PassContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitPass(this);
}


std::any PinParser::PassContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitPass(this);
  else
    return visitor->visitChildren(this);
}

PinParser::PassContext* PinParser::pass() {
  PassContext *_localctx = _tracker.createInstance<PassContext>(_ctx, getState());
  enterRule(_localctx, 12, PinParser::RulePass);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(191);
    match(PinParser::T__3);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- DefvarContext ------------------------------------------------------------------

PinParser::DefvarContext::DefvarContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PinParser::DefvarContext::TYPE_ID() {
  return getToken(PinParser::TYPE_ID, 0);
}

PinParser::AssignContext* PinParser::DefvarContext::assign() {
  return getRuleContext<PinParser::AssignContext>(0);
}

std::vector<tree::TerminalNode *> PinParser::DefvarContext::VARNAME() {
  return getTokens(PinParser::VARNAME);
}

tree::TerminalNode* PinParser::DefvarContext::VARNAME(size_t i) {
  return getToken(PinParser::VARNAME, i);
}


size_t PinParser::DefvarContext::getRuleIndex() const {
  return PinParser::RuleDefvar;
}

void PinParser::DefvarContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterDefvar(this);
}

void PinParser::DefvarContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitDefvar(this);
}


std::any PinParser::DefvarContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitDefvar(this);
  else
    return visitor->visitChildren(this);
}

PinParser::DefvarContext* PinParser::defvar() {
  DefvarContext *_localctx = _tracker.createInstance<DefvarContext>(_ctx, getState());
  enterRule(_localctx, 14, PinParser::RuleDefvar);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(193);
    match(PinParser::TYPE_ID);
    setState(204);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 8, _ctx)) {
    case 1: {
      setState(194);
      assign();
      break;
    }

    case 2: {
      setState(195);
      match(PinParser::VARNAME);
      setState(200);
      _errHandler->sync(this);
      _la = _input->LA(1);
      while (_la == PinParser::T__4) {
        setState(196);
        match(PinParser::T__4);
        setState(197);
        match(PinParser::VARNAME);
        setState(202);
        _errHandler->sync(this);
        _la = _input->LA(1);
      }
      setState(203);
      match(PinParser::T__2);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- DeclareStructContext ------------------------------------------------------------------

PinParser::DeclareStructContext::DeclareStructContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PinParser::DeclareStructContext::JIEGOU_SPACE() {
  return getToken(PinParser::JIEGOU_SPACE, 0);
}

tree::TerminalNode* PinParser::DeclareStructContext::VARNAME() {
  return getToken(PinParser::VARNAME, 0);
}

PinParser::Struct_bodyContext* PinParser::DeclareStructContext::struct_body() {
  return getRuleContext<PinParser::Struct_bodyContext>(0);
}


size_t PinParser::DeclareStructContext::getRuleIndex() const {
  return PinParser::RuleDeclareStruct;
}

void PinParser::DeclareStructContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterDeclareStruct(this);
}

void PinParser::DeclareStructContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitDeclareStruct(this);
}


std::any PinParser::DeclareStructContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitDeclareStruct(this);
  else
    return visitor->visitChildren(this);
}

PinParser::DeclareStructContext* PinParser::declareStruct() {
  DeclareStructContext *_localctx = _tracker.createInstance<DeclareStructContext>(_ctx, getState());
  enterRule(_localctx, 16, PinParser::RuleDeclareStruct);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(206);
    match(PinParser::JIEGOU_SPACE);
    setState(207);
    match(PinParser::VARNAME);
    setState(208);
    struct_body();
    setState(210);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PinParser::T__2) {
      setState(209);
      match(PinParser::T__2);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- DefstvarContext ------------------------------------------------------------------

PinParser::DefstvarContext::DefstvarContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<tree::TerminalNode *> PinParser::DefstvarContext::VARNAME() {
  return getTokens(PinParser::VARNAME);
}

tree::TerminalNode* PinParser::DefstvarContext::VARNAME(size_t i) {
  return getToken(PinParser::VARNAME, i);
}

std::vector<PinParser::OnestContext *> PinParser::DefstvarContext::onest() {
  return getRuleContexts<PinParser::OnestContext>();
}

PinParser::OnestContext* PinParser::DefstvarContext::onest(size_t i) {
  return getRuleContext<PinParser::OnestContext>(i);
}


size_t PinParser::DefstvarContext::getRuleIndex() const {
  return PinParser::RuleDefstvar;
}

void PinParser::DefstvarContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterDefstvar(this);
}

void PinParser::DefstvarContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitDefstvar(this);
}


std::any PinParser::DefstvarContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitDefstvar(this);
  else
    return visitor->visitChildren(this);
}

PinParser::DefstvarContext* PinParser::defstvar() {
  DefstvarContext *_localctx = _tracker.createInstance<DefstvarContext>(_ctx, getState());
  enterRule(_localctx, 18, PinParser::RuleDefstvar);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(212);
    match(PinParser::VARNAME);
    setState(213);
    onest();
    setState(221);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PinParser::T__4) {
      setState(214);
      match(PinParser::T__4);
      setState(216);
      _errHandler->sync(this);

      switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 10, _ctx)) {
      case 1: {
        setState(215);
        match(PinParser::VARNAME);
        break;
      }

      default:
        break;
      }
      setState(218);
      onest();
      setState(223);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(224);
    match(PinParser::T__2);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- OnestContext ------------------------------------------------------------------

PinParser::OnestContext::OnestContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PinParser::AssignStOneContext* PinParser::OnestContext::assignStOne() {
  return getRuleContext<PinParser::AssignStOneContext>(0);
}

tree::TerminalNode* PinParser::OnestContext::VARNAME() {
  return getToken(PinParser::VARNAME, 0);
}


size_t PinParser::OnestContext::getRuleIndex() const {
  return PinParser::RuleOnest;
}

void PinParser::OnestContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterOnest(this);
}

void PinParser::OnestContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitOnest(this);
}


std::any PinParser::OnestContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitOnest(this);
  else
    return visitor->visitChildren(this);
}

PinParser::OnestContext* PinParser::onest() {
  OnestContext *_localctx = _tracker.createInstance<OnestContext>(_ctx, getState());
  enterRule(_localctx, 20, PinParser::RuleOnest);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(228);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 12, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(226);
      assignStOne();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(227);
      match(PinParser::VARNAME);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- AssignContext ------------------------------------------------------------------

PinParser::AssignContext::AssignContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PinParser::AssginNoEndContext* PinParser::AssignContext::assginNoEnd() {
  return getRuleContext<PinParser::AssginNoEndContext>(0);
}


size_t PinParser::AssignContext::getRuleIndex() const {
  return PinParser::RuleAssign;
}

void PinParser::AssignContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAssign(this);
}

void PinParser::AssignContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAssign(this);
}


std::any PinParser::AssignContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitAssign(this);
  else
    return visitor->visitChildren(this);
}

PinParser::AssignContext* PinParser::assign() {
  AssignContext *_localctx = _tracker.createInstance<AssignContext>(_ctx, getState());
  enterRule(_localctx, 22, PinParser::RuleAssign);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(230);
    assginNoEnd();
    setState(231);
    match(PinParser::T__2);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- AssginNoEndContext ------------------------------------------------------------------

PinParser::AssginNoEndContext::AssginNoEndContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PinParser::AssignOneContext *> PinParser::AssginNoEndContext::assignOne() {
  return getRuleContexts<PinParser::AssignOneContext>();
}

PinParser::AssignOneContext* PinParser::AssginNoEndContext::assignOne(size_t i) {
  return getRuleContext<PinParser::AssignOneContext>(i);
}


size_t PinParser::AssginNoEndContext::getRuleIndex() const {
  return PinParser::RuleAssginNoEnd;
}

void PinParser::AssginNoEndContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAssginNoEnd(this);
}

void PinParser::AssginNoEndContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAssginNoEnd(this);
}


std::any PinParser::AssginNoEndContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitAssginNoEnd(this);
  else
    return visitor->visitChildren(this);
}

PinParser::AssginNoEndContext* PinParser::assginNoEnd() {
  AssginNoEndContext *_localctx = _tracker.createInstance<AssginNoEndContext>(_ctx, getState());
  enterRule(_localctx, 24, PinParser::RuleAssginNoEnd);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(233);
    assignOne();
    setState(238);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 13, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(234);
        match(PinParser::T__4);
        setState(235);
        assignOne(); 
      }
      setState(240);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 13, _ctx);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- AssignOneContext ------------------------------------------------------------------

PinParser::AssignOneContext::AssignOneContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}


size_t PinParser::AssignOneContext::getRuleIndex() const {
  return PinParser::RuleAssignOne;
}

void PinParser::AssignOneContext::copyFrom(AssignOneContext *ctx) {
  ParserRuleContext::copyFrom(ctx);
}

//----------------- AssignVarContext ------------------------------------------------------------------

PinParser::PinvarContext* PinParser::AssignVarContext::pinvar() {
  return getRuleContext<PinParser::PinvarContext>(0);
}

PinParser::AssignOpContext* PinParser::AssignVarContext::assignOp() {
  return getRuleContext<PinParser::AssignOpContext>(0);
}

PinParser::RightvarContext* PinParser::AssignVarContext::rightvar() {
  return getRuleContext<PinParser::RightvarContext>(0);
}

PinParser::AssignVarContext::AssignVarContext(AssignOneContext *ctx) { copyFrom(ctx); }

void PinParser::AssignVarContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAssignVar(this);
}
void PinParser::AssignVarContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAssignVar(this);
}

std::any PinParser::AssignVarContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitAssignVar(this);
  else
    return visitor->visitChildren(this);
}
//----------------- AssignStructVarContext ------------------------------------------------------------------

PinParser::AssignStOneContext* PinParser::AssignStructVarContext::assignStOne() {
  return getRuleContext<PinParser::AssignStOneContext>(0);
}

PinParser::AssignStructVarContext::AssignStructVarContext(AssignOneContext *ctx) { copyFrom(ctx); }

void PinParser::AssignStructVarContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAssignStructVar(this);
}
void PinParser::AssignStructVarContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAssignStructVar(this);
}

std::any PinParser::AssignStructVarContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitAssignStructVar(this);
  else
    return visitor->visitChildren(this);
}
PinParser::AssignOneContext* PinParser::assignOne() {
  AssignOneContext *_localctx = _tracker.createInstance<AssignOneContext>(_ctx, getState());
  enterRule(_localctx, 26, PinParser::RuleAssignOne);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(246);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 14, _ctx)) {
    case 1: {
      _localctx = _tracker.createInstance<PinParser::AssignVarContext>(_localctx);
      enterOuterAlt(_localctx, 1);
      setState(241);
      pinvar();
      setState(242);
      assignOp();
      setState(243);
      rightvar();
      break;
    }

    case 2: {
      _localctx = _tracker.createInstance<PinParser::AssignStructVarContext>(_localctx);
      enterOuterAlt(_localctx, 2);
      setState(245);
      assignStOne();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- RightvarContext ------------------------------------------------------------------

PinParser::RightvarContext::RightvarContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PinParser::ExprContext* PinParser::RightvarContext::expr() {
  return getRuleContext<PinParser::ExprContext>(0);
}

PinParser::ListContext* PinParser::RightvarContext::list() {
  return getRuleContext<PinParser::ListContext>(0);
}

PinParser::MapContext* PinParser::RightvarContext::map() {
  return getRuleContext<PinParser::MapContext>(0);
}

PinParser::StRightVarContext* PinParser::RightvarContext::stRightVar() {
  return getRuleContext<PinParser::StRightVarContext>(0);
}

tree::TerminalNode* PinParser::RightvarContext::EMPTY_VALUE() {
  return getToken(PinParser::EMPTY_VALUE, 0);
}


size_t PinParser::RightvarContext::getRuleIndex() const {
  return PinParser::RuleRightvar;
}

void PinParser::RightvarContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRightvar(this);
}

void PinParser::RightvarContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRightvar(this);
}


std::any PinParser::RightvarContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitRightvar(this);
  else
    return visitor->visitChildren(this);
}

PinParser::RightvarContext* PinParser::rightvar() {
  RightvarContext *_localctx = _tracker.createInstance<RightvarContext>(_ctx, getState());
  enterRule(_localctx, 28, PinParser::RuleRightvar);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(253);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 15, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(248);
      expr(0);
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(249);
      list();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(250);
      map();
      break;
    }

    case 4: {
      enterOuterAlt(_localctx, 4);
      setState(251);
      stRightVar();
      break;
    }

    case 5: {
      enterOuterAlt(_localctx, 5);
      setState(252);
      match(PinParser::EMPTY_VALUE);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- StRightVarContext ------------------------------------------------------------------

PinParser::StRightVarContext::StRightVarContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PinParser::StRightVarContext::VARNAME() {
  return getToken(PinParser::VARNAME, 0);
}

std::vector<PinParser::ExprContext *> PinParser::StRightVarContext::expr() {
  return getRuleContexts<PinParser::ExprContext>();
}

PinParser::ExprContext* PinParser::StRightVarContext::expr(size_t i) {
  return getRuleContext<PinParser::ExprContext>(i);
}


size_t PinParser::StRightVarContext::getRuleIndex() const {
  return PinParser::RuleStRightVar;
}

void PinParser::StRightVarContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStRightVar(this);
}

void PinParser::StRightVarContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStRightVar(this);
}


std::any PinParser::StRightVarContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitStRightVar(this);
  else
    return visitor->visitChildren(this);
}

PinParser::StRightVarContext* PinParser::stRightVar() {
  StRightVarContext *_localctx = _tracker.createInstance<StRightVarContext>(_ctx, getState());
  enterRule(_localctx, 30, PinParser::RuleStRightVar);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(255);
    match(PinParser::VARNAME);
    setState(256);
    match(PinParser::T__0);
    setState(257);
    expr(0);
    setState(262);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PinParser::T__4) {
      setState(258);
      match(PinParser::T__4);
      setState(259);
      expr(0);
      setState(264);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(265);
    match(PinParser::T__1);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- AssignStOneContext ------------------------------------------------------------------

PinParser::AssignStOneContext::AssignStOneContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PinParser::AssignStOneContext::VARNAME() {
  return getToken(PinParser::VARNAME, 0);
}

PinParser::StFromExprContext* PinParser::AssignStOneContext::stFromExpr() {
  return getRuleContext<PinParser::StFromExprContext>(0);
}

std::vector<PinParser::ExprContext *> PinParser::AssignStOneContext::expr() {
  return getRuleContexts<PinParser::ExprContext>();
}

PinParser::ExprContext* PinParser::AssignStOneContext::expr(size_t i) {
  return getRuleContext<PinParser::ExprContext>(i);
}


size_t PinParser::AssignStOneContext::getRuleIndex() const {
  return PinParser::RuleAssignStOne;
}

void PinParser::AssignStOneContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAssignStOne(this);
}

void PinParser::AssignStOneContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAssignStOne(this);
}


std::any PinParser::AssignStOneContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitAssignStOne(this);
  else
    return visitor->visitChildren(this);
}

PinParser::AssignStOneContext* PinParser::assignStOne() {
  AssignStOneContext *_localctx = _tracker.createInstance<AssignStOneContext>(_ctx, getState());
  enterRule(_localctx, 32, PinParser::RuleAssignStOne);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(267);
    match(PinParser::VARNAME);
    setState(268);
    match(PinParser::T__5);
    setState(281);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PinParser::T__0: {
        setState(269);
        match(PinParser::T__0);
        setState(270);
        expr(0);
        setState(275);
        _errHandler->sync(this);
        _la = _input->LA(1);
        while (_la == PinParser::T__4) {
          setState(271);
          match(PinParser::T__4);
          setState(272);
          expr(0);
          setState(277);
          _errHandler->sync(this);
          _la = _input->LA(1);
        }
        setState(278);
        match(PinParser::T__1);
        break;
      }

      case PinParser::T__11:
      case PinParser::T__14:
      case PinParser::NOT:
      case PinParser::LOG_REV:
      case PinParser::TYPE_ID:
      case PinParser::BOOL_VALUE:
      case PinParser::PACK_NAME:
      case PinParser::PIN_STATIC_FLAG:
      case PinParser::VARNAME:
      case PinParser::INT_VALUE:
      case PinParser::FLOAT_VALUE:
      case PinParser::CHAR_VALUE:
      case PinParser::STRING_VALUE:
      case PinParser::RAW_STRING_VALUE: {
        setState(280);
        stFromExpr();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- StFromExprContext ------------------------------------------------------------------

PinParser::StFromExprContext::StFromExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PinParser::ExprContext* PinParser::StFromExprContext::expr() {
  return getRuleContext<PinParser::ExprContext>(0);
}


size_t PinParser::StFromExprContext::getRuleIndex() const {
  return PinParser::RuleStFromExpr;
}

void PinParser::StFromExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStFromExpr(this);
}

void PinParser::StFromExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStFromExpr(this);
}


std::any PinParser::StFromExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitStFromExpr(this);
  else
    return visitor->visitChildren(this);
}

PinParser::StFromExprContext* PinParser::stFromExpr() {
  StFromExprContext *_localctx = _tracker.createInstance<StFromExprContext>(_ctx, getState());
  enterRule(_localctx, 34, PinParser::RuleStFromExpr);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(283);
    expr(0);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- AssignOpContext ------------------------------------------------------------------

PinParser::AssignOpContext::AssignOpContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}


size_t PinParser::AssignOpContext::getRuleIndex() const {
  return PinParser::RuleAssignOp;
}

void PinParser::AssignOpContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAssignOp(this);
}

void PinParser::AssignOpContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAssignOp(this);
}


std::any PinParser::AssignOpContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitAssignOp(this);
  else
    return visitor->visitChildren(this);
}

PinParser::AssignOpContext* PinParser::assignOp() {
  AssignOpContext *_localctx = _tracker.createInstance<AssignOpContext>(_ctx, getState());
  enterRule(_localctx, 36, PinParser::RuleAssignOp);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(285);
    _la = _input->LA(1);
    if (!((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & 1984) != 0))) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- PrintFormatPartContext ------------------------------------------------------------------

PinParser::PrintFormatPartContext::PrintFormatPartContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PinParser::SingleExprContext* PinParser::PrintFormatPartContext::singleExpr() {
  return getRuleContext<PinParser::SingleExprContext>(0);
}

PinParser::MultiExprContext* PinParser::PrintFormatPartContext::multiExpr() {
  return getRuleContext<PinParser::MultiExprContext>(0);
}


size_t PinParser::PrintFormatPartContext::getRuleIndex() const {
  return PinParser::RulePrintFormatPart;
}

void PinParser::PrintFormatPartContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterPrintFormatPart(this);
}

void PinParser::PrintFormatPartContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitPrintFormatPart(this);
}


std::any PinParser::PrintFormatPartContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitPrintFormatPart(this);
  else
    return visitor->visitChildren(this);
}

PinParser::PrintFormatPartContext* PinParser::printFormatPart() {
  PrintFormatPartContext *_localctx = _tracker.createInstance<PrintFormatPartContext>(_ctx, getState());
  enterRule(_localctx, 38, PinParser::RulePrintFormatPart);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(287);
    match(PinParser::T__10);
    setState(290);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 19, _ctx)) {
    case 1: {
      setState(288);
      singleExpr();
      break;
    }

    case 2: {
      setState(289);
      multiExpr();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- SingleExprContext ------------------------------------------------------------------

PinParser::SingleExprContext::SingleExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PinParser::ExprContext* PinParser::SingleExprContext::expr() {
  return getRuleContext<PinParser::ExprContext>(0);
}


size_t PinParser::SingleExprContext::getRuleIndex() const {
  return PinParser::RuleSingleExpr;
}

void PinParser::SingleExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSingleExpr(this);
}

void PinParser::SingleExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSingleExpr(this);
}


std::any PinParser::SingleExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitSingleExpr(this);
  else
    return visitor->visitChildren(this);
}

PinParser::SingleExprContext* PinParser::singleExpr() {
  SingleExprContext *_localctx = _tracker.createInstance<SingleExprContext>(_ctx, getState());
  enterRule(_localctx, 40, PinParser::RuleSingleExpr);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(292);
    expr(0);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- MultiExprContext ------------------------------------------------------------------

PinParser::MultiExprContext::MultiExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PinParser::ExprContext *> PinParser::MultiExprContext::expr() {
  return getRuleContexts<PinParser::ExprContext>();
}

PinParser::ExprContext* PinParser::MultiExprContext::expr(size_t i) {
  return getRuleContext<PinParser::ExprContext>(i);
}


size_t PinParser::MultiExprContext::getRuleIndex() const {
  return PinParser::RuleMultiExpr;
}

void PinParser::MultiExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterMultiExpr(this);
}

void PinParser::MultiExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitMultiExpr(this);
}


std::any PinParser::MultiExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitMultiExpr(this);
  else
    return visitor->visitChildren(this);
}

PinParser::MultiExprContext* PinParser::multiExpr() {
  MultiExprContext *_localctx = _tracker.createInstance<MultiExprContext>(_ctx, getState());
  enterRule(_localctx, 42, PinParser::RuleMultiExpr);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(294);
    match(PinParser::T__11);
    setState(295);
    expr(0);
    setState(300);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PinParser::T__4) {
      setState(296);
      match(PinParser::T__4);
      setState(297);
      expr(0);
      setState(302);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(303);
    match(PinParser::T__12);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FmtStringContext ------------------------------------------------------------------

PinParser::FmtStringContext::FmtStringContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PinParser::Format_stringContext* PinParser::FmtStringContext::format_string() {
  return getRuleContext<PinParser::Format_stringContext>(0);
}

PinParser::PrintFormatPartContext* PinParser::FmtStringContext::printFormatPart() {
  return getRuleContext<PinParser::PrintFormatPartContext>(0);
}


size_t PinParser::FmtStringContext::getRuleIndex() const {
  return PinParser::RuleFmtString;
}

void PinParser::FmtStringContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFmtString(this);
}

void PinParser::FmtStringContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFmtString(this);
}


std::any PinParser::FmtStringContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitFmtString(this);
  else
    return visitor->visitChildren(this);
}

PinParser::FmtStringContext* PinParser::fmtString() {
  FmtStringContext *_localctx = _tracker.createInstance<FmtStringContext>(_ctx, getState());
  enterRule(_localctx, 44, PinParser::RuleFmtString);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(305);
    format_string();
    setState(306);
    printFormatPart();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Hs_printContext ------------------------------------------------------------------

PinParser::Hs_printContext::Hs_printContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}


size_t PinParser::Hs_printContext::getRuleIndex() const {
  return PinParser::RuleHs_print;
}

void PinParser::Hs_printContext::copyFrom(Hs_printContext *ctx) {
  ParserRuleContext::copyFrom(ctx);
}

//----------------- FormatPrintExprContext ------------------------------------------------------------------

tree::TerminalNode* PinParser::FormatPrintExprContext::DA_YIN_KEY() {
  return getToken(PinParser::DA_YIN_KEY, 0);
}

PinParser::FmtStringContext* PinParser::FormatPrintExprContext::fmtString() {
  return getRuleContext<PinParser::FmtStringContext>(0);
}

PinParser::FormatPrintExprContext::FormatPrintExprContext(Hs_printContext *ctx) { copyFrom(ctx); }

void PinParser::FormatPrintExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFormatPrintExpr(this);
}
void PinParser::FormatPrintExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFormatPrintExpr(this);
}

std::any PinParser::FormatPrintExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitFormatPrintExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- OutputExprContext ------------------------------------------------------------------

tree::TerminalNode* PinParser::OutputExprContext::DA_YIN_KEY() {
  return getToken(PinParser::DA_YIN_KEY, 0);
}

std::vector<PinParser::ExprContext *> PinParser::OutputExprContext::expr() {
  return getRuleContexts<PinParser::ExprContext>();
}

PinParser::ExprContext* PinParser::OutputExprContext::expr(size_t i) {
  return getRuleContext<PinParser::ExprContext>(i);
}

PinParser::OutputExprContext::OutputExprContext(Hs_printContext *ctx) { copyFrom(ctx); }

void PinParser::OutputExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterOutputExpr(this);
}
void PinParser::OutputExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitOutputExpr(this);
}

std::any PinParser::OutputExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitOutputExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- PrintExprContext ------------------------------------------------------------------

tree::TerminalNode* PinParser::PrintExprContext::DA_YIN_KEY() {
  return getToken(PinParser::DA_YIN_KEY, 0);
}

std::vector<PinParser::ExprContext *> PinParser::PrintExprContext::expr() {
  return getRuleContexts<PinParser::ExprContext>();
}

PinParser::ExprContext* PinParser::PrintExprContext::expr(size_t i) {
  return getRuleContext<PinParser::ExprContext>(i);
}

PinParser::PrintExprContext::PrintExprContext(Hs_printContext *ctx) { copyFrom(ctx); }

void PinParser::PrintExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterPrintExpr(this);
}
void PinParser::PrintExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitPrintExpr(this);
}

std::any PinParser::PrintExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitPrintExpr(this);
  else
    return visitor->visitChildren(this);
}
PinParser::Hs_printContext* PinParser::hs_print() {
  Hs_printContext *_localctx = _tracker.createInstance<Hs_printContext>(_ctx, getState());
  enterRule(_localctx, 46, PinParser::RuleHs_print);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(339);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 23, _ctx)) {
    case 1: {
      _localctx = _tracker.createInstance<PinParser::FormatPrintExprContext>(_localctx);
      enterOuterAlt(_localctx, 1);
      setState(308);
      match(PinParser::DA_YIN_KEY);
      setState(309);
      match(PinParser::T__11);
      setState(310);
      fmtString();
      setState(311);
      match(PinParser::T__12);
      setState(312);
      match(PinParser::T__2);
      break;
    }

    case 2: {
      _localctx = _tracker.createInstance<PinParser::PrintExprContext>(_localctx);
      enterOuterAlt(_localctx, 2);
      setState(314);
      match(PinParser::DA_YIN_KEY);
      setState(315);
      match(PinParser::T__11);
      setState(316);
      expr(0);
      setState(321);
      _errHandler->sync(this);
      _la = _input->LA(1);
      while (_la == PinParser::T__4) {
        setState(317);
        match(PinParser::T__4);
        setState(318);
        expr(0);
        setState(323);
        _errHandler->sync(this);
        _la = _input->LA(1);
      }
      setState(324);
      match(PinParser::T__12);
      setState(325);
      match(PinParser::T__2);
      break;
    }

    case 3: {
      _localctx = _tracker.createInstance<PinParser::OutputExprContext>(_localctx);
      enterOuterAlt(_localctx, 3);
      setState(327);
      match(PinParser::DA_YIN_KEY);
      setState(328);
      match(PinParser::T__13);
      setState(329);
      expr(0);
      setState(334);
      _errHandler->sync(this);
      _la = _input->LA(1);
      while (_la == PinParser::T__13) {
        setState(330);
        match(PinParser::T__13);
        setState(331);
        expr(0);
        setState(336);
        _errHandler->sync(this);
        _la = _input->LA(1);
      }
      setState(337);
      match(PinParser::T__2);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- PinAutoAddSubContext ------------------------------------------------------------------

PinParser::PinAutoAddSubContext::PinAutoAddSubContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PinParser::PinvarContext* PinParser::PinAutoAddSubContext::pinvar() {
  return getRuleContext<PinParser::PinvarContext>(0);
}

tree::TerminalNode* PinParser::PinAutoAddSubContext::AUTO_ADD_SUB() {
  return getToken(PinParser::AUTO_ADD_SUB, 0);
}


size_t PinParser::PinAutoAddSubContext::getRuleIndex() const {
  return PinParser::RulePinAutoAddSub;
}

void PinParser::PinAutoAddSubContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterPinAutoAddSub(this);
}

void PinParser::PinAutoAddSubContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitPinAutoAddSub(this);
}


std::any PinParser::PinAutoAddSubContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitPinAutoAddSub(this);
  else
    return visitor->visitChildren(this);
}

PinParser::PinAutoAddSubContext* PinParser::pinAutoAddSub() {
  PinAutoAddSubContext *_localctx = _tracker.createInstance<PinAutoAddSubContext>(_ctx, getState());
  enterRule(_localctx, 48, PinParser::RulePinAutoAddSub);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(341);
    pinvar();
    setState(342);
    match(PinParser::AUTO_ADD_SUB);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ExprContext ------------------------------------------------------------------

PinParser::ExprContext::ExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}


size_t PinParser::ExprContext::getRuleIndex() const {
  return PinParser::RuleExpr;
}

void PinParser::ExprContext::copyFrom(ExprContext *ctx) {
  ParserRuleContext::copyFrom(ctx);
}

//----------------- StrExprContext ------------------------------------------------------------------

tree::TerminalNode* PinParser::StrExprContext::STRING_VALUE() {
  return getToken(PinParser::STRING_VALUE, 0);
}

PinParser::StrExprContext::StrExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::StrExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStrExpr(this);
}
void PinParser::StrExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStrExpr(this);
}

std::any PinParser::StrExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitStrExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- LogAndExprContext ------------------------------------------------------------------

std::vector<PinParser::ExprContext *> PinParser::LogAndExprContext::expr() {
  return getRuleContexts<PinParser::ExprContext>();
}

PinParser::ExprContext* PinParser::LogAndExprContext::expr(size_t i) {
  return getRuleContext<PinParser::ExprContext>(i);
}

tree::TerminalNode* PinParser::LogAndExprContext::LOG_AND() {
  return getToken(PinParser::LOG_AND, 0);
}

PinParser::LogAndExprContext::LogAndExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::LogAndExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterLogAndExpr(this);
}
void PinParser::LogAndExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitLogAndExpr(this);
}

std::any PinParser::LogAndExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitLogAndExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- LogOrExprContext ------------------------------------------------------------------

std::vector<PinParser::ExprContext *> PinParser::LogOrExprContext::expr() {
  return getRuleContexts<PinParser::ExprContext>();
}

PinParser::ExprContext* PinParser::LogOrExprContext::expr(size_t i) {
  return getRuleContext<PinParser::ExprContext>(i);
}

tree::TerminalNode* PinParser::LogOrExprContext::LOG_OR() {
  return getToken(PinParser::LOG_OR, 0);
}

PinParser::LogOrExprContext::LogOrExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::LogOrExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterLogOrExpr(this);
}
void PinParser::LogOrExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitLogOrExpr(this);
}

std::any PinParser::LogOrExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitLogOrExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- RowStrExprContext ------------------------------------------------------------------

tree::TerminalNode* PinParser::RowStrExprContext::RAW_STRING_VALUE() {
  return getToken(PinParser::RAW_STRING_VALUE, 0);
}

PinParser::RowStrExprContext::RowStrExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::RowStrExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRowStrExpr(this);
}
void PinParser::RowStrExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRowStrExpr(this);
}

std::any PinParser::RowStrExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitRowStrExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- AssignAutoAddContext ------------------------------------------------------------------

PinParser::PinAutoAddSubContext* PinParser::AssignAutoAddContext::pinAutoAddSub() {
  return getRuleContext<PinParser::PinAutoAddSubContext>(0);
}

PinParser::AssignAutoAddContext::AssignAutoAddContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::AssignAutoAddContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAssignAutoAdd(this);
}
void PinParser::AssignAutoAddContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAssignAutoAdd(this);
}

std::any PinParser::AssignAutoAddContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitAssignAutoAdd(this);
  else
    return visitor->visitChildren(this);
}
//----------------- SubExprContext ------------------------------------------------------------------

std::vector<PinParser::ExprContext *> PinParser::SubExprContext::expr() {
  return getRuleContexts<PinParser::ExprContext>();
}

PinParser::ExprContext* PinParser::SubExprContext::expr(size_t i) {
  return getRuleContext<PinParser::ExprContext>(i);
}

PinParser::SubExprContext::SubExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::SubExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSubExpr(this);
}
void PinParser::SubExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSubExpr(this);
}

std::any PinParser::SubExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitSubExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ParenthesesExprContext ------------------------------------------------------------------

PinParser::ExprContext* PinParser::ParenthesesExprContext::expr() {
  return getRuleContext<PinParser::ExprContext>(0);
}

PinParser::ParenthesesExprContext::ParenthesesExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::ParenthesesExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterParenthesesExpr(this);
}
void PinParser::ParenthesesExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitParenthesesExpr(this);
}

std::any PinParser::ParenthesesExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitParenthesesExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- GreaterEqualExprContext ------------------------------------------------------------------

std::vector<PinParser::ExprContext *> PinParser::GreaterEqualExprContext::expr() {
  return getRuleContexts<PinParser::ExprContext>();
}

PinParser::ExprContext* PinParser::GreaterEqualExprContext::expr(size_t i) {
  return getRuleContext<PinParser::ExprContext>(i);
}

PinParser::GreaterEqualExprContext::GreaterEqualExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::GreaterEqualExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterGreaterEqualExpr(this);
}
void PinParser::GreaterEqualExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitGreaterEqualExpr(this);
}

std::any PinParser::GreaterEqualExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitGreaterEqualExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- FloatExprContext ------------------------------------------------------------------

tree::TerminalNode* PinParser::FloatExprContext::FLOAT_VALUE() {
  return getToken(PinParser::FLOAT_VALUE, 0);
}

PinParser::FloatExprContext::FloatExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::FloatExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFloatExpr(this);
}
void PinParser::FloatExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFloatExpr(this);
}

std::any PinParser::FloatExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitFloatExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- GreaterExprContext ------------------------------------------------------------------

std::vector<PinParser::ExprContext *> PinParser::GreaterExprContext::expr() {
  return getRuleContexts<PinParser::ExprContext>();
}

PinParser::ExprContext* PinParser::GreaterExprContext::expr(size_t i) {
  return getRuleContext<PinParser::ExprContext>(i);
}

PinParser::GreaterExprContext::GreaterExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::GreaterExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterGreaterExpr(this);
}
void PinParser::GreaterExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitGreaterExpr(this);
}

std::any PinParser::GreaterExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitGreaterExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- FmtStrExprContext ------------------------------------------------------------------

PinParser::FmtStringContext* PinParser::FmtStrExprContext::fmtString() {
  return getRuleContext<PinParser::FmtStringContext>(0);
}

PinParser::FmtStrExprContext::FmtStrExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::FmtStrExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFmtStrExpr(this);
}
void PinParser::FmtStrExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFmtStrExpr(this);
}

std::any PinParser::FmtStrExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitFmtStrExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- DivExprContext ------------------------------------------------------------------

std::vector<PinParser::ExprContext *> PinParser::DivExprContext::expr() {
  return getRuleContexts<PinParser::ExprContext>();
}

PinParser::ExprContext* PinParser::DivExprContext::expr(size_t i) {
  return getRuleContext<PinParser::ExprContext>(i);
}

PinParser::DivExprContext::DivExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::DivExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterDivExpr(this);
}
void PinParser::DivExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitDivExpr(this);
}

std::any PinParser::DivExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitDivExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- UnequalExprContext ------------------------------------------------------------------

std::vector<PinParser::ExprContext *> PinParser::UnequalExprContext::expr() {
  return getRuleContexts<PinParser::ExprContext>();
}

PinParser::ExprContext* PinParser::UnequalExprContext::expr(size_t i) {
  return getRuleContext<PinParser::ExprContext>(i);
}

PinParser::UnequalExprContext::UnequalExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::UnequalExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterUnequalExpr(this);
}
void PinParser::UnequalExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitUnequalExpr(this);
}

std::any PinParser::UnequalExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitUnequalExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- RemainderExprContext ------------------------------------------------------------------

std::vector<PinParser::ExprContext *> PinParser::RemainderExprContext::expr() {
  return getRuleContexts<PinParser::ExprContext>();
}

PinParser::ExprContext* PinParser::RemainderExprContext::expr(size_t i) {
  return getRuleContext<PinParser::ExprContext>(i);
}

PinParser::RemainderExprContext::RemainderExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::RemainderExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRemainderExpr(this);
}
void PinParser::RemainderExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRemainderExpr(this);
}

std::any PinParser::RemainderExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitRemainderExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- BoolValueExprContext ------------------------------------------------------------------

tree::TerminalNode* PinParser::BoolValueExprContext::BOOL_VALUE() {
  return getToken(PinParser::BOOL_VALUE, 0);
}

PinParser::BoolValueExprContext::BoolValueExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::BoolValueExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterBoolValueExpr(this);
}
void PinParser::BoolValueExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitBoolValueExpr(this);
}

std::any PinParser::BoolValueExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitBoolValueExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- NegationExprContext ------------------------------------------------------------------

PinParser::AtomContext* PinParser::NegationExprContext::atom() {
  return getRuleContext<PinParser::AtomContext>(0);
}

PinParser::NegationExprContext::NegationExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::NegationExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterNegationExpr(this);
}
void PinParser::NegationExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitNegationExpr(this);
}

std::any PinParser::NegationExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitNegationExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- IntExprContext ------------------------------------------------------------------

tree::TerminalNode* PinParser::IntExprContext::INT_VALUE() {
  return getToken(PinParser::INT_VALUE, 0);
}

PinParser::IntExprContext::IntExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::IntExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterIntExpr(this);
}
void PinParser::IntExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitIntExpr(this);
}

std::any PinParser::IntExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitIntExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- InExprContext ------------------------------------------------------------------

PinParser::ExprContext* PinParser::InExprContext::expr() {
  return getRuleContext<PinParser::ExprContext>(0);
}

tree::TerminalNode* PinParser::InExprContext::IN() {
  return getToken(PinParser::IN, 0);
}

PinParser::RightvarContext* PinParser::InExprContext::rightvar() {
  return getRuleContext<PinParser::RightvarContext>(0);
}

PinParser::InExprContext::InExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::InExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterInExpr(this);
}
void PinParser::InExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitInExpr(this);
}

std::any PinParser::InExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitInExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- LessExprContext ------------------------------------------------------------------

std::vector<PinParser::ExprContext *> PinParser::LessExprContext::expr() {
  return getRuleContexts<PinParser::ExprContext>();
}

PinParser::ExprContext* PinParser::LessExprContext::expr(size_t i) {
  return getRuleContext<PinParser::ExprContext>(i);
}

PinParser::LessExprContext::LessExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::LessExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterLessExpr(this);
}
void PinParser::LessExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitLessExpr(this);
}

std::any PinParser::LessExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitLessExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- OrExprContext ------------------------------------------------------------------

std::vector<PinParser::ExprContext *> PinParser::OrExprContext::expr() {
  return getRuleContexts<PinParser::ExprContext>();
}

PinParser::ExprContext* PinParser::OrExprContext::expr(size_t i) {
  return getRuleContext<PinParser::ExprContext>(i);
}

tree::TerminalNode* PinParser::OrExprContext::OR() {
  return getToken(PinParser::OR, 0);
}

PinParser::OrExprContext::OrExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::OrExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterOrExpr(this);
}
void PinParser::OrExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitOrExpr(this);
}

std::any PinParser::OrExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitOrExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- FlagExprContext ------------------------------------------------------------------

PinParser::PinFlagContext* PinParser::FlagExprContext::pinFlag() {
  return getRuleContext<PinParser::PinFlagContext>(0);
}

PinParser::FlagExprContext::FlagExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::FlagExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFlagExpr(this);
}
void PinParser::FlagExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFlagExpr(this);
}

std::any PinParser::FlagExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitFlagExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- CharValueExprContext ------------------------------------------------------------------

tree::TerminalNode* PinParser::CharValueExprContext::CHAR_VALUE() {
  return getToken(PinParser::CHAR_VALUE, 0);
}

PinParser::CharValueExprContext::CharValueExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::CharValueExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterCharValueExpr(this);
}
void PinParser::CharValueExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitCharValueExpr(this);
}

std::any PinParser::CharValueExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitCharValueExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- LogRevExprContext ------------------------------------------------------------------

tree::TerminalNode* PinParser::LogRevExprContext::LOG_REV() {
  return getToken(PinParser::LOG_REV, 0);
}

PinParser::RevVarContext* PinParser::LogRevExprContext::revVar() {
  return getRuleContext<PinParser::RevVarContext>(0);
}

PinParser::LogRevExprContext::LogRevExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::LogRevExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterLogRevExpr(this);
}
void PinParser::LogRevExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitLogRevExpr(this);
}

std::any PinParser::LogRevExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitLogRevExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- MultExprContext ------------------------------------------------------------------

std::vector<PinParser::ExprContext *> PinParser::MultExprContext::expr() {
  return getRuleContexts<PinParser::ExprContext>();
}

PinParser::ExprContext* PinParser::MultExprContext::expr(size_t i) {
  return getRuleContext<PinParser::ExprContext>(i);
}

PinParser::MultExprContext::MultExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::MultExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterMultExpr(this);
}
void PinParser::MultExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitMultExpr(this);
}

std::any PinParser::MultExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitMultExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- LessEqualExprContext ------------------------------------------------------------------

std::vector<PinParser::ExprContext *> PinParser::LessEqualExprContext::expr() {
  return getRuleContexts<PinParser::ExprContext>();
}

PinParser::ExprContext* PinParser::LessEqualExprContext::expr(size_t i) {
  return getRuleContext<PinParser::ExprContext>(i);
}

PinParser::LessEqualExprContext::LessEqualExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::LessEqualExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterLessEqualExpr(this);
}
void PinParser::LessEqualExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitLessEqualExpr(this);
}

std::any PinParser::LessEqualExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitLessEqualExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- VarExprContext ------------------------------------------------------------------

PinParser::PinvarContext* PinParser::VarExprContext::pinvar() {
  return getRuleContext<PinParser::PinvarContext>(0);
}

PinParser::VarExprContext::VarExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::VarExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterVarExpr(this);
}
void PinParser::VarExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitVarExpr(this);
}

std::any PinParser::VarExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitVarExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- NotExprContext ------------------------------------------------------------------

tree::TerminalNode* PinParser::NotExprContext::NOT() {
  return getToken(PinParser::NOT, 0);
}

PinParser::ExprContext* PinParser::NotExprContext::expr() {
  return getRuleContext<PinParser::ExprContext>(0);
}

PinParser::NotExprContext::NotExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::NotExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterNotExpr(this);
}
void PinParser::NotExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitNotExpr(this);
}

std::any PinParser::NotExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitNotExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- NotinExprContext ------------------------------------------------------------------

PinParser::ExprContext* PinParser::NotinExprContext::expr() {
  return getRuleContext<PinParser::ExprContext>(0);
}

tree::TerminalNode* PinParser::NotinExprContext::NOT() {
  return getToken(PinParser::NOT, 0);
}

tree::TerminalNode* PinParser::NotinExprContext::IN() {
  return getToken(PinParser::IN, 0);
}

PinParser::RightvarContext* PinParser::NotinExprContext::rightvar() {
  return getRuleContext<PinParser::RightvarContext>(0);
}

PinParser::NotinExprContext::NotinExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::NotinExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterNotinExpr(this);
}
void PinParser::NotinExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitNotinExpr(this);
}

std::any PinParser::NotinExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitNotinExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- AddExprContext ------------------------------------------------------------------

std::vector<PinParser::ExprContext *> PinParser::AddExprContext::expr() {
  return getRuleContexts<PinParser::ExprContext>();
}

PinParser::ExprContext* PinParser::AddExprContext::expr(size_t i) {
  return getRuleContext<PinParser::ExprContext>(i);
}

PinParser::AddExprContext::AddExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::AddExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAddExpr(this);
}
void PinParser::AddExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAddExpr(this);
}

std::any PinParser::AddExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitAddExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- LogXorExprContext ------------------------------------------------------------------

std::vector<PinParser::ExprContext *> PinParser::LogXorExprContext::expr() {
  return getRuleContexts<PinParser::ExprContext>();
}

PinParser::ExprContext* PinParser::LogXorExprContext::expr(size_t i) {
  return getRuleContext<PinParser::ExprContext>(i);
}

tree::TerminalNode* PinParser::LogXorExprContext::LOG_XOR() {
  return getToken(PinParser::LOG_XOR, 0);
}

PinParser::LogXorExprContext::LogXorExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::LogXorExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterLogXorExpr(this);
}
void PinParser::LogXorExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitLogXorExpr(this);
}

std::any PinParser::LogXorExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitLogXorExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- CallFunExprContext ------------------------------------------------------------------

PinParser::RealCallFunContext* PinParser::CallFunExprContext::realCallFun() {
  return getRuleContext<PinParser::RealCallFunContext>(0);
}

PinParser::CallFunExprContext::CallFunExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::CallFunExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterCallFunExpr(this);
}
void PinParser::CallFunExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitCallFunExpr(this);
}

std::any PinParser::CallFunExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitCallFunExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- EqualExprContext ------------------------------------------------------------------

std::vector<PinParser::ExprContext *> PinParser::EqualExprContext::expr() {
  return getRuleContexts<PinParser::ExprContext>();
}

PinParser::ExprContext* PinParser::EqualExprContext::expr(size_t i) {
  return getRuleContext<PinParser::ExprContext>(i);
}

PinParser::EqualExprContext::EqualExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::EqualExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterEqualExpr(this);
}
void PinParser::EqualExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitEqualExpr(this);
}

std::any PinParser::EqualExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitEqualExpr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- AndExprContext ------------------------------------------------------------------

std::vector<PinParser::ExprContext *> PinParser::AndExprContext::expr() {
  return getRuleContexts<PinParser::ExprContext>();
}

PinParser::ExprContext* PinParser::AndExprContext::expr(size_t i) {
  return getRuleContext<PinParser::ExprContext>(i);
}

tree::TerminalNode* PinParser::AndExprContext::AND() {
  return getToken(PinParser::AND, 0);
}

PinParser::AndExprContext::AndExprContext(ExprContext *ctx) { copyFrom(ctx); }

void PinParser::AndExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAndExpr(this);
}
void PinParser::AndExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAndExpr(this);
}

std::any PinParser::AndExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitAndExpr(this);
  else
    return visitor->visitChildren(this);
}

PinParser::ExprContext* PinParser::expr() {
   return expr(0);
}

PinParser::ExprContext* PinParser::expr(int precedence) {
  ParserRuleContext *parentContext = _ctx;
  size_t parentState = getState();
  PinParser::ExprContext *_localctx = _tracker.createInstance<ExprContext>(_ctx, parentState);
  PinParser::ExprContext *previousContext = _localctx;
  (void)previousContext; // Silence compiler, in case the context is not used by generated code.
  size_t startState = 50;
  enterRecursionRule(_localctx, 50, PinParser::RuleExpr, precedence);

    

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    unrollRecursionContexts(parentContext);
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(366);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 24, _ctx)) {
    case 1: {
      _localctx = _tracker.createInstance<ParenthesesExprContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;

      setState(345);
      match(PinParser::T__11);
      setState(346);
      expr(0);
      setState(347);
      match(PinParser::T__12);
      break;
    }

    case 2: {
      _localctx = _tracker.createInstance<FlagExprContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(349);
      pinFlag();
      break;
    }

    case 3: {
      _localctx = _tracker.createInstance<AssignAutoAddContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(350);
      pinAutoAddSub();
      break;
    }

    case 4: {
      _localctx = _tracker.createInstance<NegationExprContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(351);
      match(PinParser::T__14);
      setState(352);
      atom();
      break;
    }

    case 5: {
      _localctx = _tracker.createInstance<LogRevExprContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(353);
      match(PinParser::LOG_REV);
      setState(354);
      revVar();
      break;
    }

    case 6: {
      _localctx = _tracker.createInstance<FmtStrExprContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(355);
      fmtString();
      break;
    }

    case 7: {
      _localctx = _tracker.createInstance<NotExprContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(356);
      match(PinParser::NOT);
      setState(357);
      expr(11);
      break;
    }

    case 8: {
      _localctx = _tracker.createInstance<IntExprContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(358);
      match(PinParser::INT_VALUE);
      break;
    }

    case 9: {
      _localctx = _tracker.createInstance<FloatExprContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(359);
      match(PinParser::FLOAT_VALUE);
      break;
    }

    case 10: {
      _localctx = _tracker.createInstance<StrExprContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(360);
      match(PinParser::STRING_VALUE);
      break;
    }

    case 11: {
      _localctx = _tracker.createInstance<RowStrExprContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(361);
      match(PinParser::RAW_STRING_VALUE);
      break;
    }

    case 12: {
      _localctx = _tracker.createInstance<BoolValueExprContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(362);
      match(PinParser::BOOL_VALUE);
      break;
    }

    case 13: {
      _localctx = _tracker.createInstance<CharValueExprContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(363);
      match(PinParser::CHAR_VALUE);
      break;
    }

    case 14: {
      _localctx = _tracker.createInstance<VarExprContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(364);
      pinvar();
      break;
    }

    case 15: {
      _localctx = _tracker.createInstance<CallFunExprContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(365);
      realCallFun();
      break;
    }

    default:
      break;
    }
    _ctx->stop = _input->LT(-1);
    setState(425);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 26, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        if (!_parseListeners.empty())
          triggerExitRuleEvent();
        previousContext = _localctx;
        setState(423);
        _errHandler->sync(this);
        switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 25, _ctx)) {
        case 1: {
          auto newContext = _tracker.createInstance<MultExprContext>(_tracker.createInstance<ExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleExpr);
          setState(368);

          if (!(precpred(_ctx, 28))) throw FailedPredicateException(this, "precpred(_ctx, 28)");
          setState(369);
          match(PinParser::T__15);
          setState(370);
          expr(29);
          break;
        }

        case 2: {
          auto newContext = _tracker.createInstance<DivExprContext>(_tracker.createInstance<ExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleExpr);
          setState(371);

          if (!(precpred(_ctx, 27))) throw FailedPredicateException(this, "precpred(_ctx, 27)");
          setState(372);
          match(PinParser::T__16);
          setState(373);
          expr(28);
          break;
        }

        case 3: {
          auto newContext = _tracker.createInstance<RemainderExprContext>(_tracker.createInstance<ExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleExpr);
          setState(374);

          if (!(precpred(_ctx, 25))) throw FailedPredicateException(this, "precpred(_ctx, 25)");
          setState(375);
          match(PinParser::T__10);
          setState(376);
          expr(26);
          break;
        }

        case 4: {
          auto newContext = _tracker.createInstance<AddExprContext>(_tracker.createInstance<ExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleExpr);
          setState(377);

          if (!(precpred(_ctx, 24))) throw FailedPredicateException(this, "precpred(_ctx, 24)");
          setState(378);
          match(PinParser::T__17);
          setState(379);
          expr(25);
          break;
        }

        case 5: {
          auto newContext = _tracker.createInstance<SubExprContext>(_tracker.createInstance<ExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleExpr);
          setState(380);

          if (!(precpred(_ctx, 23))) throw FailedPredicateException(this, "precpred(_ctx, 23)");
          setState(381);
          match(PinParser::T__14);
          setState(382);
          expr(24);
          break;
        }

        case 6: {
          auto newContext = _tracker.createInstance<LessExprContext>(_tracker.createInstance<ExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleExpr);
          setState(383);

          if (!(precpred(_ctx, 22))) throw FailedPredicateException(this, "precpred(_ctx, 22)");
          setState(384);
          match(PinParser::T__18);
          setState(385);
          expr(23);
          break;
        }

        case 7: {
          auto newContext = _tracker.createInstance<LessEqualExprContext>(_tracker.createInstance<ExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleExpr);
          setState(386);

          if (!(precpred(_ctx, 21))) throw FailedPredicateException(this, "precpred(_ctx, 21)");
          setState(387);
          match(PinParser::T__19);
          setState(388);
          expr(22);
          break;
        }

        case 8: {
          auto newContext = _tracker.createInstance<GreaterExprContext>(_tracker.createInstance<ExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleExpr);
          setState(389);

          if (!(precpred(_ctx, 20))) throw FailedPredicateException(this, "precpred(_ctx, 20)");
          setState(390);
          match(PinParser::T__20);
          setState(391);
          expr(21);
          break;
        }

        case 9: {
          auto newContext = _tracker.createInstance<GreaterEqualExprContext>(_tracker.createInstance<ExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleExpr);
          setState(392);

          if (!(precpred(_ctx, 19))) throw FailedPredicateException(this, "precpred(_ctx, 19)");
          setState(393);
          match(PinParser::T__21);
          setState(394);
          expr(20);
          break;
        }

        case 10: {
          auto newContext = _tracker.createInstance<EqualExprContext>(_tracker.createInstance<ExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleExpr);
          setState(395);

          if (!(precpred(_ctx, 18))) throw FailedPredicateException(this, "precpred(_ctx, 18)");
          setState(396);
          match(PinParser::T__22);
          setState(397);
          expr(19);
          break;
        }

        case 11: {
          auto newContext = _tracker.createInstance<UnequalExprContext>(_tracker.createInstance<ExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleExpr);
          setState(398);

          if (!(precpred(_ctx, 17))) throw FailedPredicateException(this, "precpred(_ctx, 17)");
          setState(399);
          match(PinParser::T__23);
          setState(400);
          expr(18);
          break;
        }

        case 12: {
          auto newContext = _tracker.createInstance<LogAndExprContext>(_tracker.createInstance<ExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleExpr);
          setState(401);

          if (!(precpred(_ctx, 16))) throw FailedPredicateException(this, "precpred(_ctx, 16)");
          setState(402);
          match(PinParser::LOG_AND);
          setState(403);
          expr(17);
          break;
        }

        case 13: {
          auto newContext = _tracker.createInstance<LogXorExprContext>(_tracker.createInstance<ExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleExpr);
          setState(404);

          if (!(precpred(_ctx, 15))) throw FailedPredicateException(this, "precpred(_ctx, 15)");
          setState(405);
          match(PinParser::LOG_XOR);
          setState(406);
          expr(16);
          break;
        }

        case 14: {
          auto newContext = _tracker.createInstance<LogOrExprContext>(_tracker.createInstance<ExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleExpr);
          setState(407);

          if (!(precpred(_ctx, 14))) throw FailedPredicateException(this, "precpred(_ctx, 14)");
          setState(408);
          match(PinParser::LOG_OR);
          setState(409);
          expr(15);
          break;
        }

        case 15: {
          auto newContext = _tracker.createInstance<AndExprContext>(_tracker.createInstance<ExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleExpr);
          setState(410);

          if (!(precpred(_ctx, 10))) throw FailedPredicateException(this, "precpred(_ctx, 10)");
          setState(411);
          match(PinParser::AND);
          setState(412);
          expr(11);
          break;
        }

        case 16: {
          auto newContext = _tracker.createInstance<OrExprContext>(_tracker.createInstance<ExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleExpr);
          setState(413);

          if (!(precpred(_ctx, 9))) throw FailedPredicateException(this, "precpred(_ctx, 9)");
          setState(414);
          match(PinParser::OR);
          setState(415);
          expr(10);
          break;
        }

        case 17: {
          auto newContext = _tracker.createInstance<NotinExprContext>(_tracker.createInstance<ExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleExpr);
          setState(416);

          if (!(precpred(_ctx, 13))) throw FailedPredicateException(this, "precpred(_ctx, 13)");
          setState(417);
          match(PinParser::NOT);
          setState(418);
          match(PinParser::IN);
          setState(419);
          rightvar();
          break;
        }

        case 18: {
          auto newContext = _tracker.createInstance<InExprContext>(_tracker.createInstance<ExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleExpr);
          setState(420);

          if (!(precpred(_ctx, 12))) throw FailedPredicateException(this, "precpred(_ctx, 12)");
          setState(421);
          match(PinParser::IN);
          setState(422);
          rightvar();
          break;
        }

        default:
          break;
        } 
      }
      setState(427);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 26, _ctx);
    }
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }
  return _localctx;
}

//----------------- ListContext ------------------------------------------------------------------

PinParser::ListContext::ListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PinParser::ElementContext *> PinParser::ListContext::element() {
  return getRuleContexts<PinParser::ElementContext>();
}

PinParser::ElementContext* PinParser::ListContext::element(size_t i) {
  return getRuleContext<PinParser::ElementContext>(i);
}


size_t PinParser::ListContext::getRuleIndex() const {
  return PinParser::RuleList;
}

void PinParser::ListContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterList(this);
}

void PinParser::ListContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitList(this);
}


std::any PinParser::ListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitList(this);
  else
    return visitor->visitChildren(this);
}

PinParser::ListContext* PinParser::list() {
  ListContext *_localctx = _tracker.createInstance<ListContext>(_ctx, getState());
  enterRule(_localctx, 52, PinParser::RuleList);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(428);
    match(PinParser::T__24);
    setState(437);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (((((_la - 12) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 12)) & 71459465081135113) != 0)) {
      setState(429);
      element();
      setState(434);
      _errHandler->sync(this);
      _la = _input->LA(1);
      while (_la == PinParser::T__4) {
        setState(430);
        match(PinParser::T__4);
        setState(431);
        element();
        setState(436);
        _errHandler->sync(this);
        _la = _input->LA(1);
      }
    }
    setState(439);
    match(PinParser::T__25);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ElementContext ------------------------------------------------------------------

PinParser::ElementContext::ElementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PinParser::ExprContext* PinParser::ElementContext::expr() {
  return getRuleContext<PinParser::ExprContext>(0);
}

PinParser::ListContext* PinParser::ElementContext::list() {
  return getRuleContext<PinParser::ListContext>(0);
}

PinParser::StRightVarContext* PinParser::ElementContext::stRightVar() {
  return getRuleContext<PinParser::StRightVarContext>(0);
}


size_t PinParser::ElementContext::getRuleIndex() const {
  return PinParser::RuleElement;
}

void PinParser::ElementContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterElement(this);
}

void PinParser::ElementContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitElement(this);
}


std::any PinParser::ElementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitElement(this);
  else
    return visitor->visitChildren(this);
}

PinParser::ElementContext* PinParser::element() {
  ElementContext *_localctx = _tracker.createInstance<ElementContext>(_ctx, getState());
  enterRule(_localctx, 54, PinParser::RuleElement);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(444);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 29, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(441);
      expr(0);
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(442);
      list();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(443);
      stRightVar();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- MapContext ------------------------------------------------------------------

PinParser::MapContext::MapContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PinParser::MapelementContext *> PinParser::MapContext::mapelement() {
  return getRuleContexts<PinParser::MapelementContext>();
}

PinParser::MapelementContext* PinParser::MapContext::mapelement(size_t i) {
  return getRuleContext<PinParser::MapelementContext>(i);
}


size_t PinParser::MapContext::getRuleIndex() const {
  return PinParser::RuleMap;
}

void PinParser::MapContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterMap(this);
}

void PinParser::MapContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitMap(this);
}


std::any PinParser::MapContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitMap(this);
  else
    return visitor->visitChildren(this);
}

PinParser::MapContext* PinParser::map() {
  MapContext *_localctx = _tracker.createInstance<MapContext>(_ctx, getState());
  enterRule(_localctx, 56, PinParser::RuleMap);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(446);
    match(PinParser::T__0);
    setState(455);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (((((_la - 12) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 12)) & 71459465081126921) != 0)) {
      setState(447);
      mapelement();
      setState(452);
      _errHandler->sync(this);
      _la = _input->LA(1);
      while (_la == PinParser::T__4) {
        setState(448);
        match(PinParser::T__4);
        setState(449);
        mapelement();
        setState(454);
        _errHandler->sync(this);
        _la = _input->LA(1);
      }
    }
    setState(457);
    match(PinParser::T__1);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- MapelementContext ------------------------------------------------------------------

PinParser::MapelementContext::MapelementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PinParser::MapkeyContext* PinParser::MapelementContext::mapkey() {
  return getRuleContext<PinParser::MapkeyContext>(0);
}

tree::TerminalNode* PinParser::MapelementContext::FUN_RET_AUTO_DEF() {
  return getToken(PinParser::FUN_RET_AUTO_DEF, 0);
}

PinParser::RightvarContext* PinParser::MapelementContext::rightvar() {
  return getRuleContext<PinParser::RightvarContext>(0);
}


size_t PinParser::MapelementContext::getRuleIndex() const {
  return PinParser::RuleMapelement;
}

void PinParser::MapelementContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterMapelement(this);
}

void PinParser::MapelementContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitMapelement(this);
}


std::any PinParser::MapelementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitMapelement(this);
  else
    return visitor->visitChildren(this);
}

PinParser::MapelementContext* PinParser::mapelement() {
  MapelementContext *_localctx = _tracker.createInstance<MapelementContext>(_ctx, getState());
  enterRule(_localctx, 58, PinParser::RuleMapelement);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(459);
    mapkey();
    setState(460);
    match(PinParser::FUN_RET_AUTO_DEF);
    setState(461);
    rightvar();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- MapkeyContext ------------------------------------------------------------------

PinParser::MapkeyContext::MapkeyContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PinParser::ExprContext* PinParser::MapkeyContext::expr() {
  return getRuleContext<PinParser::ExprContext>(0);
}


size_t PinParser::MapkeyContext::getRuleIndex() const {
  return PinParser::RuleMapkey;
}

void PinParser::MapkeyContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterMapkey(this);
}

void PinParser::MapkeyContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitMapkey(this);
}


std::any PinParser::MapkeyContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitMapkey(this);
  else
    return visitor->visitChildren(this);
}

PinParser::MapkeyContext* PinParser::mapkey() {
  MapkeyContext *_localctx = _tracker.createInstance<MapkeyContext>(_ctx, getState());
  enterRule(_localctx, 60, PinParser::RuleMapkey);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(463);
    expr(0);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- AtomContext ------------------------------------------------------------------

PinParser::AtomContext::AtomContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PinParser::AtomContext::INT_VALUE() {
  return getToken(PinParser::INT_VALUE, 0);
}

tree::TerminalNode* PinParser::AtomContext::FLOAT_VALUE() {
  return getToken(PinParser::FLOAT_VALUE, 0);
}

PinParser::PinvarContext* PinParser::AtomContext::pinvar() {
  return getRuleContext<PinParser::PinvarContext>(0);
}


size_t PinParser::AtomContext::getRuleIndex() const {
  return PinParser::RuleAtom;
}

void PinParser::AtomContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAtom(this);
}

void PinParser::AtomContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAtom(this);
}


std::any PinParser::AtomContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitAtom(this);
  else
    return visitor->visitChildren(this);
}

PinParser::AtomContext* PinParser::atom() {
  AtomContext *_localctx = _tracker.createInstance<AtomContext>(_ctx, getState());
  enterRule(_localctx, 62, PinParser::RuleAtom);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(468);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PinParser::INT_VALUE: {
        enterOuterAlt(_localctx, 1);
        setState(465);
        match(PinParser::INT_VALUE);
        break;
      }

      case PinParser::FLOAT_VALUE: {
        enterOuterAlt(_localctx, 2);
        setState(466);
        match(PinParser::FLOAT_VALUE);
        break;
      }

      case PinParser::VARNAME: {
        enterOuterAlt(_localctx, 3);
        setState(467);
        pinvar();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- RevVarContext ------------------------------------------------------------------

PinParser::RevVarContext::RevVarContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PinParser::PinvarContext* PinParser::RevVarContext::pinvar() {
  return getRuleContext<PinParser::PinvarContext>(0);
}


size_t PinParser::RevVarContext::getRuleIndex() const {
  return PinParser::RuleRevVar;
}

void PinParser::RevVarContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRevVar(this);
}

void PinParser::RevVarContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRevVar(this);
}


std::any PinParser::RevVarContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitRevVar(this);
  else
    return visitor->visitChildren(this);
}

PinParser::RevVarContext* PinParser::revVar() {
  RevVarContext *_localctx = _tracker.createInstance<RevVarContext>(_ctx, getState());
  enterRule(_localctx, 64, PinParser::RuleRevVar);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(470);
    pinvar();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- PinvarContext ------------------------------------------------------------------

PinParser::PinvarContext::PinvarContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PinParser::PinvarContext::VARNAME() {
  return getToken(PinParser::VARNAME, 0);
}

std::vector<PinParser::ListindexContext *> PinParser::PinvarContext::listindex() {
  return getRuleContexts<PinParser::ListindexContext>();
}

PinParser::ListindexContext* PinParser::PinvarContext::listindex(size_t i) {
  return getRuleContext<PinParser::ListindexContext>(i);
}

PinParser::StMemVarContext* PinParser::PinvarContext::stMemVar() {
  return getRuleContext<PinParser::StMemVarContext>(0);
}


size_t PinParser::PinvarContext::getRuleIndex() const {
  return PinParser::RulePinvar;
}

void PinParser::PinvarContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterPinvar(this);
}

void PinParser::PinvarContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitPinvar(this);
}


std::any PinParser::PinvarContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitPinvar(this);
  else
    return visitor->visitChildren(this);
}

PinParser::PinvarContext* PinParser::pinvar() {
  PinvarContext *_localctx = _tracker.createInstance<PinvarContext>(_ctx, getState());
  enterRule(_localctx, 66, PinParser::RulePinvar);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(472);
    match(PinParser::VARNAME);
    setState(479);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 33, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(473);
        match(PinParser::T__24);
        setState(474);
        listindex();
        setState(475);
        match(PinParser::T__25); 
      }
      setState(481);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 33, _ctx);
    }
    setState(484);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 34, _ctx)) {
    case 1: {
      setState(482);
      match(PinParser::T__26);
      setState(483);
      stMemVar();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ListMapVarContext ------------------------------------------------------------------

PinParser::ListMapVarContext::ListMapVarContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PinParser::ListMapVarContext::VARNAME() {
  return getToken(PinParser::VARNAME, 0);
}

std::vector<PinParser::ListindexContext *> PinParser::ListMapVarContext::listindex() {
  return getRuleContexts<PinParser::ListindexContext>();
}

PinParser::ListindexContext* PinParser::ListMapVarContext::listindex(size_t i) {
  return getRuleContext<PinParser::ListindexContext>(i);
}

PinParser::StMemVarContext* PinParser::ListMapVarContext::stMemVar() {
  return getRuleContext<PinParser::StMemVarContext>(0);
}


size_t PinParser::ListMapVarContext::getRuleIndex() const {
  return PinParser::RuleListMapVar;
}

void PinParser::ListMapVarContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterListMapVar(this);
}

void PinParser::ListMapVarContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitListMapVar(this);
}


std::any PinParser::ListMapVarContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitListMapVar(this);
  else
    return visitor->visitChildren(this);
}

PinParser::ListMapVarContext* PinParser::listMapVar() {
  ListMapVarContext *_localctx = _tracker.createInstance<ListMapVarContext>(_ctx, getState());
  enterRule(_localctx, 68, PinParser::RuleListMapVar);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(486);
    match(PinParser::VARNAME);
    setState(493);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PinParser::T__24) {
      setState(487);
      match(PinParser::T__24);
      setState(488);
      listindex();
      setState(489);
      match(PinParser::T__25);
      setState(495);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(498);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PinParser::T__26) {
      setState(496);
      match(PinParser::T__26);
      setState(497);
      stMemVar();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ListindexContext ------------------------------------------------------------------

PinParser::ListindexContext::ListindexContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PinParser::ExprContext* PinParser::ListindexContext::expr() {
  return getRuleContext<PinParser::ExprContext>(0);
}


size_t PinParser::ListindexContext::getRuleIndex() const {
  return PinParser::RuleListindex;
}

void PinParser::ListindexContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterListindex(this);
}

void PinParser::ListindexContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitListindex(this);
}


std::any PinParser::ListindexContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitListindex(this);
  else
    return visitor->visitChildren(this);
}

PinParser::ListindexContext* PinParser::listindex() {
  ListindexContext *_localctx = _tracker.createInstance<ListindexContext>(_ctx, getState());
  enterRule(_localctx, 70, PinParser::RuleListindex);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(500);
    expr(0);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- StructMemContext ------------------------------------------------------------------

PinParser::StructMemContext::StructMemContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PinParser::StructMemContext::VARNAME() {
  return getToken(PinParser::VARNAME, 0);
}

PinParser::StMemVarContext* PinParser::StructMemContext::stMemVar() {
  return getRuleContext<PinParser::StMemVarContext>(0);
}


size_t PinParser::StructMemContext::getRuleIndex() const {
  return PinParser::RuleStructMem;
}

void PinParser::StructMemContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStructMem(this);
}

void PinParser::StructMemContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStructMem(this);
}


std::any PinParser::StructMemContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitStructMem(this);
  else
    return visitor->visitChildren(this);
}

PinParser::StructMemContext* PinParser::structMem() {
  StructMemContext *_localctx = _tracker.createInstance<StructMemContext>(_ctx, getState());
  enterRule(_localctx, 72, PinParser::RuleStructMem);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(502);
    match(PinParser::VARNAME);
    setState(503);
    match(PinParser::T__26);
    setState(504);
    stMemVar();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- StructMemVarContext ------------------------------------------------------------------

PinParser::StructMemVarContext::StructMemVarContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PinParser::StructMemVarContext::VARNAME() {
  return getToken(PinParser::VARNAME, 0);
}

PinParser::StMemVarContext* PinParser::StructMemVarContext::stMemVar() {
  return getRuleContext<PinParser::StMemVarContext>(0);
}


size_t PinParser::StructMemVarContext::getRuleIndex() const {
  return PinParser::RuleStructMemVar;
}

void PinParser::StructMemVarContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStructMemVar(this);
}

void PinParser::StructMemVarContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStructMemVar(this);
}


std::any PinParser::StructMemVarContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitStructMemVar(this);
  else
    return visitor->visitChildren(this);
}

PinParser::StructMemVarContext* PinParser::structMemVar() {
  StructMemVarContext *_localctx = _tracker.createInstance<StructMemVarContext>(_ctx, getState());
  enterRule(_localctx, 74, PinParser::RuleStructMemVar);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(506);
    match(PinParser::VARNAME);
    setState(507);
    match(PinParser::T__26);
    setState(508);
    stMemVar();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- StMemVarContext ------------------------------------------------------------------

PinParser::StMemVarContext::StMemVarContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PinParser::StMemVarContext::VARNAME() {
  return getToken(PinParser::VARNAME, 0);
}


size_t PinParser::StMemVarContext::getRuleIndex() const {
  return PinParser::RuleStMemVar;
}

void PinParser::StMemVarContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStMemVar(this);
}

void PinParser::StMemVarContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStMemVar(this);
}


std::any PinParser::StMemVarContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitStMemVar(this);
  else
    return visitor->visitChildren(this);
}

PinParser::StMemVarContext* PinParser::stMemVar() {
  StMemVarContext *_localctx = _tracker.createInstance<StMemVarContext>(_ctx, getState());
  enterRule(_localctx, 76, PinParser::RuleStMemVar);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(510);
    match(PinParser::VARNAME);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- MemberFunAccessContext ------------------------------------------------------------------

PinParser::MemberFunAccessContext::MemberFunAccessContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PinParser::FunobjContext* PinParser::MemberFunAccessContext::funobj() {
  return getRuleContext<PinParser::FunobjContext>(0);
}

tree::TerminalNode* PinParser::MemberFunAccessContext::VARNAME() {
  return getToken(PinParser::VARNAME, 0);
}


size_t PinParser::MemberFunAccessContext::getRuleIndex() const {
  return PinParser::RuleMemberFunAccess;
}

void PinParser::MemberFunAccessContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterMemberFunAccess(this);
}

void PinParser::MemberFunAccessContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitMemberFunAccess(this);
}


std::any PinParser::MemberFunAccessContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitMemberFunAccess(this);
  else
    return visitor->visitChildren(this);
}

PinParser::MemberFunAccessContext* PinParser::memberFunAccess() {
  MemberFunAccessContext *_localctx = _tracker.createInstance<MemberFunAccessContext>(_ctx, getState());
  enterRule(_localctx, 78, PinParser::RuleMemberFunAccess);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(512);
    funobj();
    setState(513);
    match(PinParser::T__26);
    setState(514);
    match(PinParser::VARNAME);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FunobjContext ------------------------------------------------------------------

PinParser::FunobjContext::FunobjContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PinParser::FunobjContext::TYPE_ID() {
  return getToken(PinParser::TYPE_ID, 0);
}

tree::TerminalNode* PinParser::FunobjContext::PACK_NAME() {
  return getToken(PinParser::PACK_NAME, 0);
}

PinParser::PinvarContext* PinParser::FunobjContext::pinvar() {
  return getRuleContext<PinParser::PinvarContext>(0);
}


size_t PinParser::FunobjContext::getRuleIndex() const {
  return PinParser::RuleFunobj;
}

void PinParser::FunobjContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFunobj(this);
}

void PinParser::FunobjContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFunobj(this);
}


std::any PinParser::FunobjContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitFunobj(this);
  else
    return visitor->visitChildren(this);
}

PinParser::FunobjContext* PinParser::funobj() {
  FunobjContext *_localctx = _tracker.createInstance<FunobjContext>(_ctx, getState());
  enterRule(_localctx, 80, PinParser::RuleFunobj);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(519);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PinParser::TYPE_ID: {
        enterOuterAlt(_localctx, 1);
        setState(516);
        match(PinParser::TYPE_ID);
        break;
      }

      case PinParser::PACK_NAME: {
        enterOuterAlt(_localctx, 2);
        setState(517);
        match(PinParser::PACK_NAME);
        break;
      }

      case PinParser::VARNAME: {
        enterOuterAlt(_localctx, 3);
        setState(518);
        pinvar();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FunctionContext ------------------------------------------------------------------

PinParser::FunctionContext::FunctionContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PinParser::FunctionContext::HANSHU() {
  return getToken(PinParser::HANSHU, 0);
}

tree::TerminalNode* PinParser::FunctionContext::VARNAME() {
  return getToken(PinParser::VARNAME, 0);
}

PinParser::BlockContext* PinParser::FunctionContext::block() {
  return getRuleContext<PinParser::BlockContext>(0);
}

PinParser::DefArgumentListContext* PinParser::FunctionContext::defArgumentList() {
  return getRuleContext<PinParser::DefArgumentListContext>(0);
}

PinParser::DefFunRetContext* PinParser::FunctionContext::defFunRet() {
  return getRuleContext<PinParser::DefFunRetContext>(0);
}


size_t PinParser::FunctionContext::getRuleIndex() const {
  return PinParser::RuleFunction;
}

void PinParser::FunctionContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFunction(this);
}

void PinParser::FunctionContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFunction(this);
}


std::any PinParser::FunctionContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitFunction(this);
  else
    return visitor->visitChildren(this);
}

PinParser::FunctionContext* PinParser::function() {
  FunctionContext *_localctx = _tracker.createInstance<FunctionContext>(_ctx, getState());
  enterRule(_localctx, 82, PinParser::RuleFunction);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(521);
    match(PinParser::HANSHU);
    setState(522);
    match(PinParser::VARNAME);
    setState(523);
    match(PinParser::T__11);
    setState(525);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if ((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & 4758053006316929024) != 0)) {
      setState(524);
      defArgumentList();
    }
    setState(527);
    match(PinParser::T__12);
    setState(529);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PinParser::T__11) {
      setState(528);
      defFunRet();
    }
    setState(531);
    block();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- DefFunRetContext ------------------------------------------------------------------

PinParser::DefFunRetContext::DefFunRetContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PinParser::FunretArgContext *> PinParser::DefFunRetContext::funretArg() {
  return getRuleContexts<PinParser::FunretArgContext>();
}

PinParser::FunretArgContext* PinParser::DefFunRetContext::funretArg(size_t i) {
  return getRuleContext<PinParser::FunretArgContext>(i);
}


size_t PinParser::DefFunRetContext::getRuleIndex() const {
  return PinParser::RuleDefFunRet;
}

void PinParser::DefFunRetContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterDefFunRet(this);
}

void PinParser::DefFunRetContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitDefFunRet(this);
}


std::any PinParser::DefFunRetContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitDefFunRet(this);
  else
    return visitor->visitChildren(this);
}

PinParser::DefFunRetContext* PinParser::defFunRet() {
  DefFunRetContext *_localctx = _tracker.createInstance<DefFunRetContext>(_ctx, getState());
  enterRule(_localctx, 84, PinParser::RuleDefFunRet);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(546);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 41, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(533);
      match(PinParser::T__11);
      setState(534);
      funretArg();
      setState(539);
      _errHandler->sync(this);
      _la = _input->LA(1);
      while (_la == PinParser::T__4) {
        setState(535);
        match(PinParser::T__4);
        setState(536);
        funretArg();
        setState(541);
        _errHandler->sync(this);
        _la = _input->LA(1);
      }
      setState(542);
      match(PinParser::T__12);
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(544);
      match(PinParser::T__11);
      setState(545);
      match(PinParser::T__12);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FunretArgContext ------------------------------------------------------------------

PinParser::FunretArgContext::FunretArgContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PinParser::FunretArgContext::TYPE_ID() {
  return getToken(PinParser::TYPE_ID, 0);
}

tree::TerminalNode* PinParser::FunretArgContext::VARNAME() {
  return getToken(PinParser::VARNAME, 0);
}


size_t PinParser::FunretArgContext::getRuleIndex() const {
  return PinParser::RuleFunretArg;
}

void PinParser::FunretArgContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFunretArg(this);
}

void PinParser::FunretArgContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFunretArg(this);
}


std::any PinParser::FunretArgContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitFunretArg(this);
  else
    return visitor->visitChildren(this);
}

PinParser::FunretArgContext* PinParser::funretArg() {
  FunretArgContext *_localctx = _tracker.createInstance<FunretArgContext>(_ctx, getState());
  enterRule(_localctx, 86, PinParser::RuleFunretArg);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(548);
    _la = _input->LA(1);
    if (!(_la == PinParser::TYPE_ID

    || _la == PinParser::VARNAME)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- RetCodeContext ------------------------------------------------------------------

PinParser::RetCodeContext::RetCodeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PinParser::RetCodeContext::FANHUI_KEY() {
  return getToken(PinParser::FANHUI_KEY, 0);
}

std::vector<PinParser::RightvarContext *> PinParser::RetCodeContext::rightvar() {
  return getRuleContexts<PinParser::RightvarContext>();
}

PinParser::RightvarContext* PinParser::RetCodeContext::rightvar(size_t i) {
  return getRuleContext<PinParser::RightvarContext>(i);
}


size_t PinParser::RetCodeContext::getRuleIndex() const {
  return PinParser::RuleRetCode;
}

void PinParser::RetCodeContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRetCode(this);
}

void PinParser::RetCodeContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRetCode(this);
}


std::any PinParser::RetCodeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitRetCode(this);
  else
    return visitor->visitChildren(this);
}

PinParser::RetCodeContext* PinParser::retCode() {
  RetCodeContext *_localctx = _tracker.createInstance<RetCodeContext>(_ctx, getState());
  enterRule(_localctx, 88, PinParser::RuleRetCode);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(563);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 43, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(550);
      match(PinParser::FANHUI_KEY);
      setState(551);
      rightvar();
      setState(556);
      _errHandler->sync(this);
      _la = _input->LA(1);
      while (_la == PinParser::T__4) {
        setState(552);
        match(PinParser::T__4);
        setState(553);
        rightvar();
        setState(558);
        _errHandler->sync(this);
        _la = _input->LA(1);
      }
      setState(559);
      match(PinParser::T__2);
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(561);
      match(PinParser::FANHUI_KEY);
      setState(562);
      match(PinParser::T__2);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- DefArgumentListContext ------------------------------------------------------------------

PinParser::DefArgumentListContext::DefArgumentListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PinParser::DefArgumentContext *> PinParser::DefArgumentListContext::defArgument() {
  return getRuleContexts<PinParser::DefArgumentContext>();
}

PinParser::DefArgumentContext* PinParser::DefArgumentListContext::defArgument(size_t i) {
  return getRuleContext<PinParser::DefArgumentContext>(i);
}


size_t PinParser::DefArgumentListContext::getRuleIndex() const {
  return PinParser::RuleDefArgumentList;
}

void PinParser::DefArgumentListContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterDefArgumentList(this);
}

void PinParser::DefArgumentListContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitDefArgumentList(this);
}


std::any PinParser::DefArgumentListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitDefArgumentList(this);
  else
    return visitor->visitChildren(this);
}

PinParser::DefArgumentListContext* PinParser::defArgumentList() {
  DefArgumentListContext *_localctx = _tracker.createInstance<DefArgumentListContext>(_ctx, getState());
  enterRule(_localctx, 90, PinParser::RuleDefArgumentList);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(565);
    defArgument();
    setState(570);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PinParser::T__4) {
      setState(566);
      match(PinParser::T__4);
      setState(567);
      defArgument();
      setState(572);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- DefArgumentContext ------------------------------------------------------------------

PinParser::DefArgumentContext::DefArgumentContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PinParser::DefArgumentContext::TYPE_ID() {
  return getToken(PinParser::TYPE_ID, 0);
}

std::vector<tree::TerminalNode *> PinParser::DefArgumentContext::VARNAME() {
  return getTokens(PinParser::VARNAME);
}

tree::TerminalNode* PinParser::DefArgumentContext::VARNAME(size_t i) {
  return getToken(PinParser::VARNAME, i);
}

tree::TerminalNode* PinParser::DefArgumentContext::HUIDIAO() {
  return getToken(PinParser::HUIDIAO, 0);
}


size_t PinParser::DefArgumentContext::getRuleIndex() const {
  return PinParser::RuleDefArgument;
}

void PinParser::DefArgumentContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterDefArgument(this);
}

void PinParser::DefArgumentContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitDefArgument(this);
}


std::any PinParser::DefArgumentContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitDefArgument(this);
  else
    return visitor->visitChildren(this);
}

PinParser::DefArgumentContext* PinParser::defArgument() {
  DefArgumentContext *_localctx = _tracker.createInstance<DefArgumentContext>(_ctx, getState());
  enterRule(_localctx, 92, PinParser::RuleDefArgument);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(579);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PinParser::TYPE_ID: {
        enterOuterAlt(_localctx, 1);
        setState(573);
        match(PinParser::TYPE_ID);
        setState(574);
        match(PinParser::VARNAME);
        break;
      }

      case PinParser::HUIDIAO: {
        enterOuterAlt(_localctx, 2);
        setState(575);
        match(PinParser::HUIDIAO);
        setState(576);
        match(PinParser::VARNAME);
        break;
      }

      case PinParser::VARNAME: {
        enterOuterAlt(_localctx, 3);
        setState(577);
        match(PinParser::VARNAME);
        setState(578);
        match(PinParser::VARNAME);
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Format_stringContext ------------------------------------------------------------------

PinParser::Format_stringContext::Format_stringContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PinParser::Format_stringContext::STRING_VALUE() {
  return getToken(PinParser::STRING_VALUE, 0);
}


size_t PinParser::Format_stringContext::getRuleIndex() const {
  return PinParser::RuleFormat_string;
}

void PinParser::Format_stringContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFormat_string(this);
}

void PinParser::Format_stringContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFormat_string(this);
}


std::any PinParser::Format_stringContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitFormat_string(this);
  else
    return visitor->visitChildren(this);
}

PinParser::Format_stringContext* PinParser::format_string() {
  Format_stringContext *_localctx = _tracker.createInstance<Format_stringContext>(_ctx, getState());
  enterRule(_localctx, 94, PinParser::RuleFormat_string);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(581);
    match(PinParser::STRING_VALUE);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- CallFunContext ------------------------------------------------------------------

PinParser::CallFunContext::CallFunContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}


size_t PinParser::CallFunContext::getRuleIndex() const {
  return PinParser::RuleCallFun;
}

void PinParser::CallFunContext::copyFrom(CallFunContext *ctx) {
  ParserRuleContext::copyFrom(ctx);
}

//----------------- WithRetCallFunContext ------------------------------------------------------------------

PinParser::Fun_retContext* PinParser::WithRetCallFunContext::fun_ret() {
  return getRuleContext<PinParser::Fun_retContext>(0);
}

PinParser::RealCallFunContext* PinParser::WithRetCallFunContext::realCallFun() {
  return getRuleContext<PinParser::RealCallFunContext>(0);
}

PinParser::WithRetCallFunContext::WithRetCallFunContext(CallFunContext *ctx) { copyFrom(ctx); }

void PinParser::WithRetCallFunContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterWithRetCallFun(this);
}
void PinParser::WithRetCallFunContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitWithRetCallFun(this);
}

std::any PinParser::WithRetCallFunContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitWithRetCallFun(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ReturnCallFunContext ------------------------------------------------------------------

tree::TerminalNode* PinParser::ReturnCallFunContext::FANHUI_KEY() {
  return getToken(PinParser::FANHUI_KEY, 0);
}

PinParser::RealCallFunContext* PinParser::ReturnCallFunContext::realCallFun() {
  return getRuleContext<PinParser::RealCallFunContext>(0);
}

PinParser::ReturnCallFunContext::ReturnCallFunContext(CallFunContext *ctx) { copyFrom(ctx); }

void PinParser::ReturnCallFunContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterReturnCallFun(this);
}
void PinParser::ReturnCallFunContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitReturnCallFun(this);
}

std::any PinParser::ReturnCallFunContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitReturnCallFun(this);
  else
    return visitor->visitChildren(this);
}
//----------------- NoRetCallFunContext ------------------------------------------------------------------

PinParser::RealCallFunContext* PinParser::NoRetCallFunContext::realCallFun() {
  return getRuleContext<PinParser::RealCallFunContext>(0);
}

PinParser::NoRetCallFunContext::NoRetCallFunContext(CallFunContext *ctx) { copyFrom(ctx); }

void PinParser::NoRetCallFunContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterNoRetCallFun(this);
}
void PinParser::NoRetCallFunContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitNoRetCallFun(this);
}

std::any PinParser::NoRetCallFunContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitNoRetCallFun(this);
  else
    return visitor->visitChildren(this);
}
PinParser::CallFunContext* PinParser::callFun() {
  CallFunContext *_localctx = _tracker.createInstance<CallFunContext>(_ctx, getState());
  enterRule(_localctx, 96, PinParser::RuleCallFun);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(594);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 46, _ctx)) {
    case 1: {
      _localctx = _tracker.createInstance<PinParser::NoRetCallFunContext>(_localctx);
      enterOuterAlt(_localctx, 1);
      setState(583);
      realCallFun();
      setState(584);
      match(PinParser::T__2);
      break;
    }

    case 2: {
      _localctx = _tracker.createInstance<PinParser::WithRetCallFunContext>(_localctx);
      enterOuterAlt(_localctx, 2);
      setState(586);
      fun_ret();
      setState(587);
      realCallFun();
      setState(588);
      match(PinParser::T__2);
      break;
    }

    case 3: {
      _localctx = _tracker.createInstance<PinParser::ReturnCallFunContext>(_localctx);
      enterOuterAlt(_localctx, 3);
      setState(590);
      match(PinParser::FANHUI_KEY);
      setState(591);
      realCallFun();
      setState(592);
      match(PinParser::T__2);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- RealCallFunContext ------------------------------------------------------------------

PinParser::RealCallFunContext::RealCallFunContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PinParser::MemberFunAccessContext* PinParser::RealCallFunContext::memberFunAccess() {
  return getRuleContext<PinParser::MemberFunAccessContext>(0);
}

PinParser::ArgumentListContext* PinParser::RealCallFunContext::argumentList() {
  return getRuleContext<PinParser::ArgumentListContext>(0);
}

std::vector<PinParser::MultiCallFunContext *> PinParser::RealCallFunContext::multiCallFun() {
  return getRuleContexts<PinParser::MultiCallFunContext>();
}

PinParser::MultiCallFunContext* PinParser::RealCallFunContext::multiCallFun(size_t i) {
  return getRuleContext<PinParser::MultiCallFunContext>(i);
}

tree::TerminalNode* PinParser::RealCallFunContext::VARNAME() {
  return getToken(PinParser::VARNAME, 0);
}


size_t PinParser::RealCallFunContext::getRuleIndex() const {
  return PinParser::RuleRealCallFun;
}

void PinParser::RealCallFunContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRealCallFun(this);
}

void PinParser::RealCallFunContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRealCallFun(this);
}


std::any PinParser::RealCallFunContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitRealCallFun(this);
  else
    return visitor->visitChildren(this);
}

PinParser::RealCallFunContext* PinParser::realCallFun() {
  RealCallFunContext *_localctx = _tracker.createInstance<RealCallFunContext>(_ctx, getState());
  enterRule(_localctx, 98, PinParser::RuleRealCallFun);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    setState(620);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 51, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(596);
      memberFunAccess();
      setState(597);
      match(PinParser::T__11);
      setState(599);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if ((((_la & ~ 0x3fULL) == 0) &&
        ((1ULL << _la) & -2449935657267589118) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
        ((1ULL << (_la - 64)) & 15) != 0)) {
        setState(598);
        argumentList();
      }
      setState(601);
      match(PinParser::T__12);
      setState(605);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 48, _ctx);
      while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
        if (alt == 1) {
          setState(602);
          multiCallFun(); 
        }
        setState(607);
        _errHandler->sync(this);
        alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 48, _ctx);
      }
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(608);
      match(PinParser::VARNAME);
      setState(609);
      match(PinParser::T__11);
      setState(611);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if ((((_la & ~ 0x3fULL) == 0) &&
        ((1ULL << _la) & -2449935657267589118) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
        ((1ULL << (_la - 64)) & 15) != 0)) {
        setState(610);
        argumentList();
      }
      setState(613);
      match(PinParser::T__12);
      setState(617);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 50, _ctx);
      while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
        if (alt == 1) {
          setState(614);
          multiCallFun(); 
        }
        setState(619);
        _errHandler->sync(this);
        alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 50, _ctx);
      }
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- MultiCallFunContext ------------------------------------------------------------------

PinParser::MultiCallFunContext::MultiCallFunContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PinParser::MultiCallFunContext::VARNAME() {
  return getToken(PinParser::VARNAME, 0);
}

PinParser::ArgumentListContext* PinParser::MultiCallFunContext::argumentList() {
  return getRuleContext<PinParser::ArgumentListContext>(0);
}


size_t PinParser::MultiCallFunContext::getRuleIndex() const {
  return PinParser::RuleMultiCallFun;
}

void PinParser::MultiCallFunContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterMultiCallFun(this);
}

void PinParser::MultiCallFunContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitMultiCallFun(this);
}


std::any PinParser::MultiCallFunContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitMultiCallFun(this);
  else
    return visitor->visitChildren(this);
}

PinParser::MultiCallFunContext* PinParser::multiCallFun() {
  MultiCallFunContext *_localctx = _tracker.createInstance<MultiCallFunContext>(_ctx, getState());
  enterRule(_localctx, 100, PinParser::RuleMultiCallFun);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(622);
    match(PinParser::T__26);
    setState(623);
    match(PinParser::VARNAME);
    setState(624);
    match(PinParser::T__11);
    setState(626);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if ((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & -2449935657267589118) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 64)) & 15) != 0)) {
      setState(625);
      argumentList();
    }
    setState(628);
    match(PinParser::T__12);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Fun_retContext ------------------------------------------------------------------

PinParser::Fun_retContext::Fun_retContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PinParser::Ret_idContext *> PinParser::Fun_retContext::ret_id() {
  return getRuleContexts<PinParser::Ret_idContext>();
}

PinParser::Ret_idContext* PinParser::Fun_retContext::ret_id(size_t i) {
  return getRuleContext<PinParser::Ret_idContext>(i);
}

tree::TerminalNode* PinParser::Fun_retContext::FUN_RET_AUTO_DEF() {
  return getToken(PinParser::FUN_RET_AUTO_DEF, 0);
}


size_t PinParser::Fun_retContext::getRuleIndex() const {
  return PinParser::RuleFun_ret;
}

void PinParser::Fun_retContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFun_ret(this);
}

void PinParser::Fun_retContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFun_ret(this);
}


std::any PinParser::Fun_retContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitFun_ret(this);
  else
    return visitor->visitChildren(this);
}

PinParser::Fun_retContext* PinParser::fun_ret() {
  Fun_retContext *_localctx = _tracker.createInstance<Fun_retContext>(_ctx, getState());
  enterRule(_localctx, 102, PinParser::RuleFun_ret);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(630);
    ret_id();
    setState(635);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PinParser::T__4) {
      setState(631);
      match(PinParser::T__4);
      setState(632);
      ret_id();
      setState(637);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(639);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PinParser::FUN_RET_AUTO_DEF) {
      setState(638);
      match(PinParser::FUN_RET_AUTO_DEF);
    }
    setState(641);
    match(PinParser::T__5);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Ret_idContext ------------------------------------------------------------------

PinParser::Ret_idContext::Ret_idContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PinParser::PinvarContext* PinParser::Ret_idContext::pinvar() {
  return getRuleContext<PinParser::PinvarContext>(0);
}


size_t PinParser::Ret_idContext::getRuleIndex() const {
  return PinParser::RuleRet_id;
}

void PinParser::Ret_idContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRet_id(this);
}

void PinParser::Ret_idContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRet_id(this);
}


std::any PinParser::Ret_idContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitRet_id(this);
  else
    return visitor->visitChildren(this);
}

PinParser::Ret_idContext* PinParser::ret_id() {
  Ret_idContext *_localctx = _tracker.createInstance<Ret_idContext>(_ctx, getState());
  enterRule(_localctx, 104, PinParser::RuleRet_id);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(645);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PinParser::VARNAME: {
        enterOuterAlt(_localctx, 1);
        setState(643);
        pinvar();
        break;
      }

      case PinParser::T__27: {
        enterOuterAlt(_localctx, 2);
        setState(644);
        match(PinParser::T__27);
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ArgumentListContext ------------------------------------------------------------------

PinParser::ArgumentListContext::ArgumentListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PinParser::ArgumentContext *> PinParser::ArgumentListContext::argument() {
  return getRuleContexts<PinParser::ArgumentContext>();
}

PinParser::ArgumentContext* PinParser::ArgumentListContext::argument(size_t i) {
  return getRuleContext<PinParser::ArgumentContext>(i);
}


size_t PinParser::ArgumentListContext::getRuleIndex() const {
  return PinParser::RuleArgumentList;
}

void PinParser::ArgumentListContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterArgumentList(this);
}

void PinParser::ArgumentListContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitArgumentList(this);
}


std::any PinParser::ArgumentListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitArgumentList(this);
  else
    return visitor->visitChildren(this);
}

PinParser::ArgumentListContext* PinParser::argumentList() {
  ArgumentListContext *_localctx = _tracker.createInstance<ArgumentListContext>(_ctx, getState());
  enterRule(_localctx, 106, PinParser::RuleArgumentList);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(647);
    argument();
    setState(652);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PinParser::T__4) {
      setState(648);
      match(PinParser::T__4);
      setState(649);
      argument();
      setState(654);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ArgumentContext ------------------------------------------------------------------

PinParser::ArgumentContext::ArgumentContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PinParser::RightvarContext* PinParser::ArgumentContext::rightvar() {
  return getRuleContext<PinParser::RightvarContext>(0);
}


size_t PinParser::ArgumentContext::getRuleIndex() const {
  return PinParser::RuleArgument;
}

void PinParser::ArgumentContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterArgument(this);
}

void PinParser::ArgumentContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitArgument(this);
}


std::any PinParser::ArgumentContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitArgument(this);
  else
    return visitor->visitChildren(this);
}

PinParser::ArgumentContext* PinParser::argument() {
  ArgumentContext *_localctx = _tracker.createInstance<ArgumentContext>(_ctx, getState());
  enterRule(_localctx, 108, PinParser::RuleArgument);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(655);
    rightvar();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- IfContext ------------------------------------------------------------------

PinParser::IfContext::IfContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PinParser::IfContext::IF_KEY() {
  return getToken(PinParser::IF_KEY, 0);
}

PinParser::ExprContext* PinParser::IfContext::expr() {
  return getRuleContext<PinParser::ExprContext>(0);
}

PinParser::StatementContext* PinParser::IfContext::statement() {
  return getRuleContext<PinParser::StatementContext>(0);
}

std::vector<PinParser::ZifContext *> PinParser::IfContext::zif() {
  return getRuleContexts<PinParser::ZifContext>();
}

PinParser::ZifContext* PinParser::IfContext::zif(size_t i) {
  return getRuleContext<PinParser::ZifContext>(i);
}

PinParser::QtContext* PinParser::IfContext::qt() {
  return getRuleContext<PinParser::QtContext>(0);
}


size_t PinParser::IfContext::getRuleIndex() const {
  return PinParser::RuleIf;
}

void PinParser::IfContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterIf(this);
}

void PinParser::IfContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitIf(this);
}


std::any PinParser::IfContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitIf(this);
  else
    return visitor->visitChildren(this);
}

PinParser::IfContext* PinParser::if_() {
  IfContext *_localctx = _tracker.createInstance<IfContext>(_ctx, getState());
  enterRule(_localctx, 110, PinParser::RuleIf);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(657);
    match(PinParser::IF_KEY);
    setState(658);
    expr(0);
    setState(659);
    statement();
    setState(663);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 57, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(660);
        zif(); 
      }
      setState(665);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 57, _ctx);
    }
    setState(667);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 58, _ctx)) {
    case 1: {
      setState(666);
      qt();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ZifContext ------------------------------------------------------------------

PinParser::ZifContext::ZifContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PinParser::ZifContext::ZIF_KEY() {
  return getToken(PinParser::ZIF_KEY, 0);
}

PinParser::ExprContext* PinParser::ZifContext::expr() {
  return getRuleContext<PinParser::ExprContext>(0);
}

PinParser::StatementContext* PinParser::ZifContext::statement() {
  return getRuleContext<PinParser::StatementContext>(0);
}


size_t PinParser::ZifContext::getRuleIndex() const {
  return PinParser::RuleZif;
}

void PinParser::ZifContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterZif(this);
}

void PinParser::ZifContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitZif(this);
}


std::any PinParser::ZifContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitZif(this);
  else
    return visitor->visitChildren(this);
}

PinParser::ZifContext* PinParser::zif() {
  ZifContext *_localctx = _tracker.createInstance<ZifContext>(_ctx, getState());
  enterRule(_localctx, 112, PinParser::RuleZif);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(669);
    match(PinParser::ZIF_KEY);
    setState(670);
    expr(0);
    setState(671);
    statement();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- QtContext ------------------------------------------------------------------

PinParser::QtContext::QtContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PinParser::QtContext::QT_KEY() {
  return getToken(PinParser::QT_KEY, 0);
}

PinParser::StatementContext* PinParser::QtContext::statement() {
  return getRuleContext<PinParser::StatementContext>(0);
}


size_t PinParser::QtContext::getRuleIndex() const {
  return PinParser::RuleQt;
}

void PinParser::QtContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterQt(this);
}

void PinParser::QtContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitQt(this);
}


std::any PinParser::QtContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitQt(this);
  else
    return visitor->visitChildren(this);
}

PinParser::QtContext* PinParser::qt() {
  QtContext *_localctx = _tracker.createInstance<QtContext>(_ctx, getState());
  enterRule(_localctx, 114, PinParser::RuleQt);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(673);
    match(PinParser::QT_KEY);
    setState(674);
    statement();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ForContext ------------------------------------------------------------------

PinParser::ForContext::ForContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}


size_t PinParser::ForContext::getRuleIndex() const {
  return PinParser::RuleFor;
}

void PinParser::ForContext::copyFrom(ForContext *ctx) {
  ParserRuleContext::copyFrom(ctx);
}

//----------------- ForwalkContext ------------------------------------------------------------------

tree::TerminalNode* PinParser::ForwalkContext::FOR_KEY() {
  return getToken(PinParser::FOR_KEY, 0);
}

std::vector<tree::TerminalNode *> PinParser::ForwalkContext::VARNAME() {
  return getTokens(PinParser::VARNAME);
}

tree::TerminalNode* PinParser::ForwalkContext::VARNAME(size_t i) {
  return getToken(PinParser::VARNAME, i);
}

tree::TerminalNode* PinParser::ForwalkContext::IN() {
  return getToken(PinParser::IN, 0);
}

std::vector<PinParser::ExprContext *> PinParser::ForwalkContext::expr() {
  return getRuleContexts<PinParser::ExprContext>();
}

PinParser::ExprContext* PinParser::ForwalkContext::expr(size_t i) {
  return getRuleContext<PinParser::ExprContext>(i);
}

PinParser::BlockContext* PinParser::ForwalkContext::block() {
  return getRuleContext<PinParser::BlockContext>(0);
}

PinParser::ForwalkContext::ForwalkContext(ForContext *ctx) { copyFrom(ctx); }

void PinParser::ForwalkContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterForwalk(this);
}
void PinParser::ForwalkContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitForwalk(this);
}

std::any PinParser::ForwalkContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitForwalk(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ForStateContext ------------------------------------------------------------------

tree::TerminalNode* PinParser::ForStateContext::FOR_KEY() {
  return getToken(PinParser::FOR_KEY, 0);
}

PinParser::ForinitContext* PinParser::ForStateContext::forinit() {
  return getRuleContext<PinParser::ForinitContext>(0);
}

PinParser::ExprContext* PinParser::ForStateContext::expr() {
  return getRuleContext<PinParser::ExprContext>(0);
}

PinParser::StatementContext* PinParser::ForStateContext::statement() {
  return getRuleContext<PinParser::StatementContext>(0);
}

PinParser::ForincContext* PinParser::ForStateContext::forinc() {
  return getRuleContext<PinParser::ForincContext>(0);
}

PinParser::ForStateContext::ForStateContext(ForContext *ctx) { copyFrom(ctx); }

void PinParser::ForStateContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterForState(this);
}
void PinParser::ForStateContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitForState(this);
}

std::any PinParser::ForStateContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitForState(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ForInStateContext ------------------------------------------------------------------

tree::TerminalNode* PinParser::ForInStateContext::FOR_KEY() {
  return getToken(PinParser::FOR_KEY, 0);
}

std::vector<PinParser::ForinvarContext *> PinParser::ForInStateContext::forinvar() {
  return getRuleContexts<PinParser::ForinvarContext>();
}

PinParser::ForinvarContext* PinParser::ForInStateContext::forinvar(size_t i) {
  return getRuleContext<PinParser::ForinvarContext>(i);
}

tree::TerminalNode* PinParser::ForInStateContext::IN() {
  return getToken(PinParser::IN, 0);
}

PinParser::RightvarContext* PinParser::ForInStateContext::rightvar() {
  return getRuleContext<PinParser::RightvarContext>(0);
}

PinParser::StatementContext* PinParser::ForInStateContext::statement() {
  return getRuleContext<PinParser::StatementContext>(0);
}

PinParser::ForInStateContext::ForInStateContext(ForContext *ctx) { copyFrom(ctx); }

void PinParser::ForInStateContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterForInState(this);
}
void PinParser::ForInStateContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitForInState(this);
}

std::any PinParser::ForInStateContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitForInState(this);
  else
    return visitor->visitChildren(this);
}
//----------------- WhileStateContext ------------------------------------------------------------------

PinParser::ExprContext* PinParser::WhileStateContext::expr() {
  return getRuleContext<PinParser::ExprContext>(0);
}

PinParser::StatementContext* PinParser::WhileStateContext::statement() {
  return getRuleContext<PinParser::StatementContext>(0);
}

PinParser::WhileStateContext::WhileStateContext(ForContext *ctx) { copyFrom(ctx); }

void PinParser::WhileStateContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterWhileState(this);
}
void PinParser::WhileStateContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitWhileState(this);
}

std::any PinParser::WhileStateContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitWhileState(this);
  else
    return visitor->visitChildren(this);
}
PinParser::ForContext* PinParser::for_() {
  ForContext *_localctx = _tracker.createInstance<ForContext>(_ctx, getState());
  enterRule(_localctx, 116, PinParser::RuleFor);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(719);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 61, _ctx)) {
    case 1: {
      _localctx = _tracker.createInstance<PinParser::ForStateContext>(_localctx);
      enterOuterAlt(_localctx, 1);
      setState(676);
      match(PinParser::FOR_KEY);
      setState(677);
      match(PinParser::T__11);
      setState(678);
      forinit();
      setState(679);
      expr(0);
      setState(680);
      match(PinParser::T__2);
      setState(682);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if (_la == PinParser::VARNAME) {
        setState(681);
        forinc(0);
      }
      setState(684);
      match(PinParser::T__12);
      setState(685);
      statement();
      break;
    }

    case 2: {
      _localctx = _tracker.createInstance<PinParser::WhileStateContext>(_localctx);
      enterOuterAlt(_localctx, 2);
      setState(687);
      match(PinParser::T__28);
      setState(688);
      expr(0);
      setState(689);
      statement();
      break;
    }

    case 3: {
      _localctx = _tracker.createInstance<PinParser::ForInStateContext>(_localctx);
      enterOuterAlt(_localctx, 3);
      setState(691);
      match(PinParser::FOR_KEY);
      setState(692);
      forinvar();
      setState(693);
      match(PinParser::T__4);
      setState(694);
      forinvar();
      setState(695);
      match(PinParser::IN);
      setState(696);
      rightvar();
      setState(697);
      statement();
      break;
    }

    case 4: {
      _localctx = _tracker.createInstance<PinParser::ForwalkContext>(_localctx);
      enterOuterAlt(_localctx, 4);
      setState(699);
      match(PinParser::FOR_KEY);
      setState(700);
      match(PinParser::VARNAME);
      setState(701);
      match(PinParser::T__4);
      setState(702);
      match(PinParser::VARNAME);
      setState(703);
      match(PinParser::T__4);
      setState(704);
      match(PinParser::VARNAME);
      setState(705);
      match(PinParser::IN);
      setState(706);
      match(PinParser::T__29);
      setState(707);
      match(PinParser::T__11);
      setState(708);
      expr(0);
      setState(713);
      _errHandler->sync(this);
      _la = _input->LA(1);
      while (_la == PinParser::T__4) {
        setState(709);
        match(PinParser::T__4);
        setState(710);
        expr(0);
        setState(715);
        _errHandler->sync(this);
        _la = _input->LA(1);
      }
      setState(716);
      match(PinParser::T__12);
      setState(717);
      block();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ForinvarContext ------------------------------------------------------------------

PinParser::ForinvarContext::ForinvarContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PinParser::ForinvarContext::VARNAME() {
  return getToken(PinParser::VARNAME, 0);
}


size_t PinParser::ForinvarContext::getRuleIndex() const {
  return PinParser::RuleForinvar;
}

void PinParser::ForinvarContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterForinvar(this);
}

void PinParser::ForinvarContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitForinvar(this);
}


std::any PinParser::ForinvarContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitForinvar(this);
  else
    return visitor->visitChildren(this);
}

PinParser::ForinvarContext* PinParser::forinvar() {
  ForinvarContext *_localctx = _tracker.createInstance<ForinvarContext>(_ctx, getState());
  enterRule(_localctx, 118, PinParser::RuleForinvar);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(721);
    _la = _input->LA(1);
    if (!(_la == PinParser::T__27

    || _la == PinParser::VARNAME)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ForinitContext ------------------------------------------------------------------

PinParser::ForinitContext::ForinitContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PinParser::DefvarContext* PinParser::ForinitContext::defvar() {
  return getRuleContext<PinParser::DefvarContext>(0);
}

PinParser::AssignContext* PinParser::ForinitContext::assign() {
  return getRuleContext<PinParser::AssignContext>(0);
}


size_t PinParser::ForinitContext::getRuleIndex() const {
  return PinParser::RuleForinit;
}

void PinParser::ForinitContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterForinit(this);
}

void PinParser::ForinitContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitForinit(this);
}


std::any PinParser::ForinitContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitForinit(this);
  else
    return visitor->visitChildren(this);
}

PinParser::ForinitContext* PinParser::forinit() {
  ForinitContext *_localctx = _tracker.createInstance<ForinitContext>(_ctx, getState());
  enterRule(_localctx, 120, PinParser::RuleForinit);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(726);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PinParser::TYPE_ID: {
        enterOuterAlt(_localctx, 1);
        setState(723);
        defvar();
        break;
      }

      case PinParser::VARNAME: {
        enterOuterAlt(_localctx, 2);
        setState(724);
        assign();
        break;
      }

      case PinParser::T__2: {
        enterOuterAlt(_localctx, 3);
        setState(725);
        match(PinParser::T__2);
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ForincContext ------------------------------------------------------------------

PinParser::ForincContext::ForincContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PinParser::PinAutoAddSubContext* PinParser::ForincContext::pinAutoAddSub() {
  return getRuleContext<PinParser::PinAutoAddSubContext>(0);
}

PinParser::AssginNoEndContext* PinParser::ForincContext::assginNoEnd() {
  return getRuleContext<PinParser::AssginNoEndContext>(0);
}

std::vector<PinParser::ForincContext *> PinParser::ForincContext::forinc() {
  return getRuleContexts<PinParser::ForincContext>();
}

PinParser::ForincContext* PinParser::ForincContext::forinc(size_t i) {
  return getRuleContext<PinParser::ForincContext>(i);
}


size_t PinParser::ForincContext::getRuleIndex() const {
  return PinParser::RuleForinc;
}

void PinParser::ForincContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterForinc(this);
}

void PinParser::ForincContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitForinc(this);
}


std::any PinParser::ForincContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitForinc(this);
  else
    return visitor->visitChildren(this);
}


PinParser::ForincContext* PinParser::forinc() {
   return forinc(0);
}

PinParser::ForincContext* PinParser::forinc(int precedence) {
  ParserRuleContext *parentContext = _ctx;
  size_t parentState = getState();
  PinParser::ForincContext *_localctx = _tracker.createInstance<ForincContext>(_ctx, parentState);
  PinParser::ForincContext *previousContext = _localctx;
  (void)previousContext; // Silence compiler, in case the context is not used by generated code.
  size_t startState = 122;
  enterRecursionRule(_localctx, 122, PinParser::RuleForinc, precedence);

    

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    unrollRecursionContexts(parentContext);
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(731);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 63, _ctx)) {
    case 1: {
      setState(729);
      pinAutoAddSub();
      break;
    }

    case 2: {
      setState(730);
      assginNoEnd();
      break;
    }

    default:
      break;
    }
    _ctx->stop = _input->LT(-1);
    setState(738);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 64, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        if (!_parseListeners.empty())
          triggerExitRuleEvent();
        previousContext = _localctx;
        _localctx = _tracker.createInstance<ForincContext>(parentContext, parentState);
        pushNewRecursionContext(_localctx, startState, RuleForinc);
        setState(733);

        if (!(precpred(_ctx, 1))) throw FailedPredicateException(this, "precpred(_ctx, 1)");

        setState(734);
        match(PinParser::T__4);
        setState(735);
        forinc(0); 
      }
      setState(740);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 64, _ctx);
    }
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }
  return _localctx;
}

//----------------- BreakContext ------------------------------------------------------------------

PinParser::BreakContext::BreakContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}


size_t PinParser::BreakContext::getRuleIndex() const {
  return PinParser::RuleBreak;
}

void PinParser::BreakContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterBreak(this);
}

void PinParser::BreakContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitBreak(this);
}


std::any PinParser::BreakContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitBreak(this);
  else
    return visitor->visitChildren(this);
}

PinParser::BreakContext* PinParser::break_() {
  BreakContext *_localctx = _tracker.createInstance<BreakContext>(_ctx, getState());
  enterRule(_localctx, 124, PinParser::RuleBreak);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(744);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PinParser::T__30: {
        enterOuterAlt(_localctx, 1);
        setState(741);
        match(PinParser::T__30);
        break;
      }

      case PinParser::T__31: {
        enterOuterAlt(_localctx, 2);
        setState(742);
        match(PinParser::T__31);
        setState(743);
        match(PinParser::T__2);
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ContinueContext ------------------------------------------------------------------

PinParser::ContinueContext::ContinueContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}


size_t PinParser::ContinueContext::getRuleIndex() const {
  return PinParser::RuleContinue;
}

void PinParser::ContinueContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterContinue(this);
}

void PinParser::ContinueContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitContinue(this);
}


std::any PinParser::ContinueContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitContinue(this);
  else
    return visitor->visitChildren(this);
}

PinParser::ContinueContext* PinParser::continue_() {
  ContinueContext *_localctx = _tracker.createInstance<ContinueContext>(_ctx, getState());
  enterRule(_localctx, 126, PinParser::RuleContinue);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(749);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PinParser::T__32: {
        enterOuterAlt(_localctx, 1);
        setState(746);
        match(PinParser::T__32);
        break;
      }

      case PinParser::T__33: {
        enterOuterAlt(_localctx, 2);
        setState(747);
        match(PinParser::T__33);
        setState(748);
        match(PinParser::T__2);
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Struct_bodyContext ------------------------------------------------------------------

PinParser::Struct_bodyContext::Struct_bodyContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PinParser::Struct_varContext *> PinParser::Struct_bodyContext::struct_var() {
  return getRuleContexts<PinParser::Struct_varContext>();
}

PinParser::Struct_varContext* PinParser::Struct_bodyContext::struct_var(size_t i) {
  return getRuleContext<PinParser::Struct_varContext>(i);
}


size_t PinParser::Struct_bodyContext::getRuleIndex() const {
  return PinParser::RuleStruct_body;
}

void PinParser::Struct_bodyContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStruct_body(this);
}

void PinParser::Struct_bodyContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStruct_body(this);
}


std::any PinParser::Struct_bodyContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitStruct_body(this);
  else
    return visitor->visitChildren(this);
}

PinParser::Struct_bodyContext* PinParser::struct_body() {
  Struct_bodyContext *_localctx = _tracker.createInstance<Struct_bodyContext>(_ctx, getState());
  enterRule(_localctx, 128, PinParser::RuleStruct_body);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(751);
    match(PinParser::T__0);
    setState(755);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PinParser::TYPE_ID) {
      setState(752);
      struct_var();
      setState(757);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(758);
    match(PinParser::T__1);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Struct_varContext ------------------------------------------------------------------

PinParser::Struct_varContext::Struct_varContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PinParser::Struct_varContext::TYPE_ID() {
  return getToken(PinParser::TYPE_ID, 0);
}

tree::TerminalNode* PinParser::Struct_varContext::VARNAME() {
  return getToken(PinParser::VARNAME, 0);
}


size_t PinParser::Struct_varContext::getRuleIndex() const {
  return PinParser::RuleStruct_var;
}

void PinParser::Struct_varContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStruct_var(this);
}

void PinParser::Struct_varContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStruct_var(this);
}


std::any PinParser::Struct_varContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitStruct_var(this);
  else
    return visitor->visitChildren(this);
}

PinParser::Struct_varContext* PinParser::struct_var() {
  Struct_varContext *_localctx = _tracker.createInstance<Struct_varContext>(_ctx, getState());
  enterRule(_localctx, 130, PinParser::RuleStruct_var);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(760);
    match(PinParser::TYPE_ID);
    setState(761);
    match(PinParser::VARNAME);
    setState(762);
    match(PinParser::T__2);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- PinFlagContext ------------------------------------------------------------------

PinParser::PinFlagContext::PinFlagContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PinParser::PinFlagContext::PIN_STATIC_FLAG() {
  return getToken(PinParser::PIN_STATIC_FLAG, 0);
}


size_t PinParser::PinFlagContext::getRuleIndex() const {
  return PinParser::RulePinFlag;
}

void PinParser::PinFlagContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterPinFlag(this);
}

void PinParser::PinFlagContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitPinFlag(this);
}


std::any PinParser::PinFlagContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitPinFlag(this);
  else
    return visitor->visitChildren(this);
}

PinParser::PinFlagContext* PinParser::pinFlag() {
  PinFlagContext *_localctx = _tracker.createInstance<PinFlagContext>(_ctx, getState());
  enterRule(_localctx, 132, PinParser::RulePinFlag);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(764);
    match(PinParser::PIN_STATIC_FLAG);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- UnknownContext ------------------------------------------------------------------

PinParser::UnknownContext::UnknownContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}


size_t PinParser::UnknownContext::getRuleIndex() const {
  return PinParser::RuleUnknown;
}

void PinParser::UnknownContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterUnknown(this);
}

void PinParser::UnknownContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PinListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitUnknown(this);
}


std::any PinParser::UnknownContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PinVisitor*>(visitor))
    return parserVisitor->visitUnknown(this);
  else
    return visitor->visitChildren(this);
}

PinParser::UnknownContext* PinParser::unknown() {
  UnknownContext *_localctx = _tracker.createInstance<UnknownContext>(_ctx, getState());
  enterRule(_localctx, 134, PinParser::RuleUnknown);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(767); 
    _errHandler->sync(this);
    alt = 1 + 1;
    do {
      switch (alt) {
        case 1 + 1: {
              setState(766);
              matchWildcard();
              break;
            }

      default:
        throw NoViableAltException(this);
      }
      setState(769); 
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 68, _ctx);
    } while (alt != 1 && alt != atn::ATN::INVALID_ALT_NUMBER);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

bool PinParser::sempred(RuleContext *context, size_t ruleIndex, size_t predicateIndex) {
  switch (ruleIndex) {
    case 25: return exprSempred(antlrcpp::downCast<ExprContext *>(context), predicateIndex);
    case 61: return forincSempred(antlrcpp::downCast<ForincContext *>(context), predicateIndex);

  default:
    break;
  }
  return true;
}

bool PinParser::exprSempred(ExprContext *_localctx, size_t predicateIndex) {
  switch (predicateIndex) {
    case 0: return precpred(_ctx, 28);
    case 1: return precpred(_ctx, 27);
    case 2: return precpred(_ctx, 25);
    case 3: return precpred(_ctx, 24);
    case 4: return precpred(_ctx, 23);
    case 5: return precpred(_ctx, 22);
    case 6: return precpred(_ctx, 21);
    case 7: return precpred(_ctx, 20);
    case 8: return precpred(_ctx, 19);
    case 9: return precpred(_ctx, 18);
    case 10: return precpred(_ctx, 17);
    case 11: return precpred(_ctx, 16);
    case 12: return precpred(_ctx, 15);
    case 13: return precpred(_ctx, 14);
    case 14: return precpred(_ctx, 10);
    case 15: return precpred(_ctx, 9);
    case 16: return precpred(_ctx, 13);
    case 17: return precpred(_ctx, 12);

  default:
    break;
  }
  return true;
}

bool PinParser::forincSempred(ForincContext *_localctx, size_t predicateIndex) {
  switch (predicateIndex) {
    case 18: return precpred(_ctx, 1);

  default:
    break;
  }
  return true;
}

void PinParser::initialize() {
#if ANTLR4_USE_THREAD_LOCAL_CACHE
  pinParserInitialize();
#else
  ::antlr4::internal::call_once(pinParserOnceFlag, pinParserInitialize);
#endif
}
